0

I need to validate an xml content and also fetch the valid tags and their values. I had known that I Is it possible to use schematron to validate tags and their contents. Can I use schematron itself for fetching all valid tags and their values and put them in another xml or html?

If its not possible, please suggest me any other way.

Thanks, Bala.

rbm
  • 1
  • 2

2 Answers2

0

I guess the XML technology of choice for you would be XQuery in this case. Maybe take a look at the Wikipedia article about XQuery to get started.

Basically XQuery works also using XPath expressions, like Schematron, to query and extract from XML data. So it shouldn't be any problem to use any existing Schematron tests which are also XPath expressions in XQuery.

Clemens
  • 1,744
  • 11
  • 20
0

Schematron would be fine in-order to validate your XML using XPath as rules, and you can report error. But, XQuery will be more than Schematron and I use XQuery heavily to Validate XML values and I should be able to produce HTML reports well. The benefit of XQuery is that you can use programming function like IF, LOOP, String manipulations, etc., Go with XQuery.

Saran
  • 21
  • 2
  • 5