środa, 15 października 2014

How to quickly get rid of all xs:annotation elements from XML schema file (XSD, that is)

xmlstarlet ed -N xs="http://www.w3.org/2001/XMLSchema" -d "//xs:annotation" schema-file.xsd > pruned-schema-file.xsd

It lends itself well to automation and I like it. It uses XmlStarlet.
Useful when you want to compare 2 schemas (or versions of the same schema) and you're interested mainly in the schema definition.

Brak komentarzy:

Prześlij komentarz