all groups > dotnet xml > february 2005 >
You're in the

dotnet xml

group:

Getting enumerations from an XSD file


Getting enumerations from an XSD file Todd
2/24/2005 6:17:03 PM
dotnet xml: I am using an XSD to validate XML files. Within the XSD, I am storing some
simple types which are enumerations. In addition to using these XSDs to
validate XML, I would like to access the enumerations to populate some
controls on some pages. Is there any way to programatically get the
enumeration values within the XSD in my c# code???

thanks in advance!!!

Todd
--

Thanks in advance,

Re: Getting enumerations from an XSD file Peter Lillevold
2/25/2005 8:38:49 PM
Hi Todd,

ofcourse, the xsd is just another xml structure. You can load the enumeration
elements using the XmlTextReader, XPathDocument and XPathNavigator classes.
Msdn has fairly good documentation on these right here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconxpathnavigatorinnetframework.asp?frame=true


Regards,
Peter Lillevold
http://blogs.eternia.cc/peter

[quoted text, click to view]


AddThis Social Bookmark Button