Maybe I need to be clearer here. Here is a sample schema fragment:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema id="NewDataSet" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="PRFL_CNFG_ID" type="xs:int" minOccurs="0" />
<xs:element name="PRFL_ID" type="xs:int" minOccurs="0" />
<xs:element name="MDL_ID" type="xs:int" minOccurs="0" />
If I read and compile the schema, how can I easily get the element with the
attribute name="PRFL_ID"? I would hope I could do it without having to
traverse the entire schema...
Can anyone help?
Thanks,
-- Greg
"Greg Allen" <ga****@arrayinc.com> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
Is there an easy way to find an element by name given a XmlSchema object?
Or do I have to parse the entire schema myself to search for it?
Do I somehow need to use XmlSchemaXPath? If so, how?
Thanks,
-- Greg