Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / April 2006

Tip: Looking for answers? Try searching our database.

XML deserialization to Dataset and custom object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
clickbidur@gmail.com - 24 Apr 2006 07:30 GMT
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!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.