Deserialize part of xml document

  • 13 years ago

    Hello there,

    Does anyone know if you can or how to deserialize part of an xml document into an object. I.e I have an object whose fields I want to fill from data in an xml document but the entire document contains data I don't want. The class that the document is made up of is variable with a fixed part. When I deserialize the whole document into a class I get the fixed part of the document fine, plus an indicator telling me which object type the variable part is. What I want to do is deserialise the entire document (done) then examine this indicator to see what type the variable part is then deserialize said variable part into the appropriate class.

    Any ideas?

    Russ.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Beware of bugs in the above code; I have only proved it correct, not tried it.” - Donald Knuth