How can I generate xpath from an xsd? XSD validates an xml. I am working in a project where I am generating a sample XML from the xsd using java and then generating xpath from that XML. If there is any way to generate xpath directly from xsd please let me know.
Share
There are a number of problems with such tools:
The XPath expression generated rarely is a good one. No such tool will produce meaningful predicates beyond position information.
There is no tool (to my knowledge) that would generate an XPath expression that selects exactly a set of selected nodes.
Apart from this, such tools used without learning XPath are really harmful — they support ignorance.
I would recommend serious learning of XPath using books and other resources such as following.
https://stackoverflow.com/questions/339930/any-good-xslt-tutorial-book-blog-site-online/341589#341589
See the following answer for more information..
Is there an online tester for xPath selectors?