Groups | Blog | Home
all groups > dotnet xml > june 2005 >

dotnet xml : XMLSchema root node


SideByEach
6/8/2005 11:56:50 AM
Is there any way to determine what would be the XML's root node in a
XmlSchema class? I'm not sure if this is even possible since
"XmlSchemaElement" objects don't have a parent element.
I realize that I can start at the root elements of the schema and work
my way down, but there is no way to tell what is a global definition
and what is the root element. I'd like to find a way to determine
structure and where exactly a node is.

Thanks.
Chris Lovett
6/11/2005 3:30:37 PM
The problem is that XSD does not have a way to define which global element
is "the" root element for an XML document. So you will have to invent your
own XSD annotation attribute to specify this, then look for that attribute
in the UnhandledAttributes collection on each global element.

[quoted text, click to view]

AddThis Social Bookmark Button