Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an XML schema file and an XML document.Now I want the get the List of Nodes in the XML document by the specified data type in the XML schema file.
For example the XML Schema file is like
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="Employee">
        <xsd:complextype>
            <xsd:sequence>
                <xsd:element name="FirstName" type="xsd:string" />
                <xsd:element name="MiddleName" type="xsd:string" />
                <xsd:element name="LastName" type="xsd:string" />
            </xsd:sequence>
        </xsd:complextype>
    </xsd:element>
</xsd:schema>


And the XML document is as follows
<employee>
    <firstname>Jacob</firstname>
    <middlename>V</middlename>
    <lastname>Sebastian</lastname>
</employee>


Now I want the get the Node by specifying the type of the XML node like

by specifying the XML node tye 'xsd:string' rather than by the node name First or MiddleName or LastName

I want to achieve this by using SQL server or C#

Thanks in advance
Posted

1 solution

Maybe this[^] can help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900