Create empty subtree from schema?

S

Steve Marshall

Hi All, I am working on a project which is based on XML data, with an
XML Schema also behind it in order to validate the data. In working
with the data I add and remove XML nodes all over the place, of
course. I've come across several situations where it would be really
nice to create a whole little subtree of empty XML elements without
having to build it up node by node. Surely there is a way to do
this? It occurred to me that I should be able to get the schema
object to generate such a thing if I give it an element name, since
the schema knows how the element and its descendants are all
structured. But thus far I haven't found a method that suggests this
is possible. Any tips? I'm using .NET 2.0 with Visual Studio 2005.
 
M

Martin Honnen

Steve said:
Hi All, I am working on a project which is based on XML data, with an
XML Schema also behind it in order to validate the data. In working
with the data I add and remove XML nodes all over the place, of
course. I've come across several situations where it would be really
nice to create a whole little subtree of empty XML elements without
having to build it up node by node. Surely there is a way to do
this? It occurred to me that I should be able to get the schema
object to generate such a thing if I give it an element name, since
the schema knows how the element and its descendants are all
structured. But thus far I haven't found a method that suggests this
is possible. Any tips? I'm using .NET 2.0 with Visual Studio 2005.

See <http://msdn2.microsoft.com/en-us/library/aa302296.aspx>.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top