How to generate xpath from xsd?

后端 未结 3 1826
旧巷少年郎
旧巷少年郎 2021-01-12 02:10

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 fr

3条回答
  •  北海茫月
    2021-01-12 02:12

    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?

提交回复
热议问题