Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: use section of XML as source/destination of XmlSerializer?

From: "Craig Buchanan" <someone@---------.--->
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? 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent