Is there any support in .Net to get the value (for both attribute and
element) in its defined types?
The value for XmlAttribute alway gives a string for example. If it is
defined as an interger in xsd, I would like to get it as an interger. Or I
have to write my code to convert it for every types from string.
"Martin Honnen" wrote:
>
Roy wrote:
I have an XmlDocument loaded from an xml file. I have also an xsd schema file
associated with it so that it will be in the XmlSchemaSet.
How do I get the data type for the value of an XmlElement and XmlAttribute
as described in the schema while I am accessing the nodes (attributes and
element) in the XmlDocument?
That is possible in .NET 2.0, see the property SchemaInfo
<http://msdn2.microsoft.com/en-us/library/system.xml.xmlelement.schemainfo.aspx>
<http://msdn2.microsoft.com/en-us/library/system.xml.schema.ixmlschemainfo.aspx>
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/