I have a xml document as follows
<Variables>
<Email>abc@xyz.com</Email>
<Status>ENABLED</Status>
<UserDetails ID="21">
<Name>
<Title>Mr.</Title>
<FName>John</FName>
<MName>M</MName>
<LName>Dahl</LName>
</Name>
<Gender>Female</Gender>
<Address>
<Line1>Sassan</Line1>
<Line2>Massan</Line2>
<City>Utah</City>
<Country>USA</Country>
</Address>
<Phone>425265245</Phone>
<Mobile>95686265487</Mobile>
<Fax />
<Homepage />
</UserDetails>
</Variables>
First I tried to deserialize this xml to Dataset using Dataset.ReadXML
method with XMLReadMode.IgonreSchema. But the attribute ID of
UserDetails is not deserialized. What I need it to deserialize the xml
into a dataset with only one table and all the xml elements converted
to table columns.
The final result is to wrap the dataset to a Customer object. I even
tried to directly deserialize the xml to Customer object but that will
create child objects like Address, UserDetails etc.
So is there any way so that I can deserailize the xml to single table
Dataset or the Customer object with the elements mapped to public
properties
clickbidur@gmail.com - 25 Apr 2006 04:32 GMT
Common , can anyone please reply soon!