Note : XML in which I am having issue while deserialization .
In above XML attribute borr:borrowerNu mber 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,lastn ame,middlename and nameprefiix property.
What should be C#.Net codesnippet in this case?
Thanks for help.
<?xml version="1.0" encoding="UTF-8"?><loan xmlns="main" xmlns:addr="add ress" xmlns:borr="bor ro">
<borrowerList>< borrower><borr: borrowerNumber> 1</borr:borrowerNu mber><addr:addr essLineList><ad dressLine>adres s line</addressLine></addr:addressLin eList><borr:bor rowerName><borr :firstName>firs t name1</borr:firstName> <middleName /><lastName>la st name 1</lastName><nameS uffix /></borr:borrowerNa me><addr:cityNa me>city 1</addr:cityName>< addr:postalCode >postal code 1</addr:postalCode ><addr:stateCod e>rr</addr:stateCode> </borrower><borro wer><borr:borro werNumber>2</borr:borrowerNu mber><addr:addr essLineList><ad dressLine>adres s line 2</addressLine></addr:addressLin eList><borr:bor rowerName><firs tName /><middleName /><lastName /><nameSuffix /></borr:borrowerNa me><addr:cityNa me>city name 2</addr:cityName>< addr:postalCode >xxxxxxx 2</addr:postalCode ><addr:stateCod e>ff</addr:stateCode> </borrower></borrowerList></loan>
<borrowerList>< borrower><borr: borrowerNumber> 1</borr:borrowerNu mber><addr:addr essLineList><ad dressLine>adres s line</addressLine></addr:addressLin eList><borr:bor rowerName><borr :firstName>firs t name1</borr:firstName> <middleName /><lastName>la st name 1</lastName><nameS uffix /></borr:borrowerNa me><addr:cityNa me>city 1</addr:cityName>< addr:postalCode >postal code 1</addr:postalCode ><addr:stateCod e>rr</addr:stateCode> </borrower><borro wer><borr:borro werNumber>2</borr:borrowerNu mber><addr:addr essLineList><ad dressLine>adres s line 2</addressLine></addr:addressLin eList><borr:bor rowerName><firs tName /><middleName /><lastName /><nameSuffix /></borr:borrowerNa me><addr:cityNa me>city name 2</addr:cityName>< addr:postalCode >xxxxxxx 2</addr:postalCode ><addr:stateCod e>ff</addr:stateCode> </borrower></borrowerList></loan>
In above XML attribute borr:borrowerNu mber 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,lastn ame,middlename and nameprefiix property.
What should be C#.Net codesnippet in this case?
Thanks for help.