Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: use section of XML as source/destination of XmlSerializer? >Thread Next - Re: use section of XML as source/destination of XmlSerializer? Re: use section of XML as source/destination of XmlSerializer?To: NULL Date: 3/11/2009 10:02:00 AM i need to load the Node into a stream which can be fed to the XmlSerializer. this is the challenge. <z.sessions@h...> wrote in message news:48c946cb-e827-41ec-8678-8e1b0537fcfc@1...... On Mar 11, 10:12 am, "Craig Buchanan" <some...@microsoft.com> wrote: > I have an Xml file that I use as a database of information about a > manufactures products. It has the format: > > <Manufacturer> > <Products> > <Product id="1" name="product a" price="1.00" /> > ... > </Products> > <Suppliers> > <Supplier id="1" name="supplier x" /> > ... > </Suppliers> > </Manufacturer> > > I would like to be able to use the Suppliers node as the source for the > XmlSerializer's Deserialize and Serialize methods. I figure that I can > load > an XmlDocument, then select the Suppliers node using an Xpath query > (//Supplers). The question is how to send this to the XmlSerialier. > Moreover, what approach should it take for the serialization? > I'm guessing that getting the path from an XmlDocument object will work just fine but that is the only thing you are going to be able to use it for. May as well dispose that object after getting the path from it. Of course, this only applies to Deserializing the object. You will not need the XmlDocument to Serialze, as the path will be in the object already, right? | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
