S
Steve Marshall
Hi, I am working on a Visual Studio 2005 application that works with
quite complex data in XML form. The XML format is controlled by a
schema. There are times when I need to generate an (optional) element
in the XML that is quite far down in the tree structure. I can see
how to do this, but it is fairly fiddly and it seems to me there
should be a simpler way to do it, like a method on the XMLDocument or
XMLSChema object. I don't see such a thing. What I want is to
specify the schema element uniquely in some way, then say "create me
one of these in this XML document, creating any necessary parent
elements so that it all complies with the schema structure". If the
selected schema element is part of a sequence then it should of course
be inserted at the correct place in the sequence.
Am I missing something here? I can't imagine I'm alone in needing to
do this.
quite complex data in XML form. The XML format is controlled by a
schema. There are times when I need to generate an (optional) element
in the XML that is quite far down in the tree structure. I can see
how to do this, but it is fairly fiddly and it seems to me there
should be a simpler way to do it, like a method on the XMLDocument or
XMLSChema object. I don't see such a thing. What I want is to
specify the schema element uniquely in some way, then say "create me
one of these in this XML document, creating any necessary parent
elements so that it all complies with the schema structure". If the
selected schema element is part of a sequence then it should of course
be inserted at the correct place in the sequence.
Am I missing something here? I can't imagine I'm alone in needing to
do this.