srinivas_vemla
asked on
XPath and XSD
I have an XML file in a treeview and I can get the XPATH of the node for every treenode. I want to traverse my XSD (on which this XML is based on) and show all the attributes this node has according to the XSD.
How can I navigate to the element in the XSD from the XPATH? XSD has all the elements as:
<xs:Element name="whatever">
Can XPath get to the "names"?
How can I navigate to the element in the XSD from the XPATH? XSD has all the elements as:
<xs:Element name="whatever">
Can XPath get to the "names"?
I believe it can :)
If you want to select ALL "names" you use something like this:
//Element[@name]
'@' points to attributes.
See http://www.w3schools.com/xpath/xpath_syntax.asp
If you want to select ALL "names" you use something like this:
//Element[@name]
'@' points to attributes.
See http://www.w3schools.com/xpath/xpath_syntax.asp
ASKER
Are we talking of using the XpathNavigator or something?... what would a sample C# code be?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER