473,320 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

c# XML Deserialization : Parent xmlelement with namespace but child without namespace

Note : XML in which I am having issue while deserialization.
<?xml version="1.0" encoding="UTF-8"?><loan xmlns="main" xmlns:addr="address" xmlns:borr="borro">
<borrowerList><borrower><borr:borrowerNumber>1</borr:borrowerNumber><addr:addressLineList><address Line>adress line</addressLine></addr:addressLineList><borr:borrowerName><borr:firs tName>first name1</borr:firstName><middleName /><lastName>last name 1</lastName><nameSuffix /></borr:borrowerName><addr:cityName>city 1</addr:cityName><addr:postalCode>postal code 1</addr:postalCode><addr:stateCode>rr</addr:stateCode></borrower><borrower><borr:borrowerNumber>2</borr:borrowerNumber><addr:addressLineList><address Line>adress line 2</addressLine></addr:addressLineList><borr:borrowerName><firstName /><middleName /><lastName /><nameSuffix /></borr:borrowerName><addr:cityName>city name 2</addr:cityName><addr:postalCode>xxxxxxx 2</addr:postalCode><addr:stateCode>ff</addr:stateCode></borrower></borrowerList></loan>
In above XML attribute borr:borrowerNumber has namespace borr. but all the child of this attribute is not having namespace. So while deserialization I am not getting correct value for property firstname,lastname,middlename and nameprefiix property.

What should be C#.Net codesnippet in this case?

Thanks for help.
May 20 '10 #1
0 832

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Omar Llanos | last post by:
I have Form1 and Form2 (which is inherited from Form1), and I created a button in Form2 that will fill up a textbox in Form1. What code would do that? I tried the simplest way: //from child...
8
by: Waleed Seada | last post by:
Hi all What need to be done to get the MDI parent call his MDI children Events, methods Thanks in advance /WS
2
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
1
by: Michael | last post by:
Hi Everyone, I seem to be having a problem accessing a menuitem on the MDIParent from a child form. From a login (frmSecurity -child form) screen, I need to hide a menuitem based on the users...
2
by: VBLearner | last post by:
How to close the parent and all child forms together at once when click on parent window's close button X?
1
by: Eric | last post by:
I want to call a method on the MDI parent from the child. Basically the method will set some text (message) on a status strip and show the appropriate icon (for the type of message). I'd also...
1
by: bhargavi ramineni | last post by:
I have used the following javascript code to get a child window for parent window. childWin...
7
by: markrandolph | last post by:
I have parent.htm and child.htm ================================================================= In parent.htm we have: var parentarray = new Array(5) window.open("child.htm",.....) ...
1
by: kingfly2000 | last post by:
I have a probelm about creating DIV in parent window from child window. following code works find in IE8, but it does not work in IE7 and 6 aaa.html <html> <head> <title>aaa</title> </head>...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.