Page 1 of 1

Can validate a XML against XSD from command line?

Posted: Fri May 23, 2008 1:30 am
by pstein
Can I pass an XML doc through command line to Oxygen and let it validate against an XSD?

I would appreciate a command syntax like:

oxygen.exe -validate my.xml my.xsd

Possible errors should be displayed in this case on the command prompt.
No GUI should pop up.

Is this somehow possible?

Same question with xslt processing on the command line.

Peter

Re: Can validate a XML against XSD from command line?

Posted: Fri May 23, 2008 3:45 pm
by sorin_ristache
Hello,

Oxygen is a graphical application which cannot be used for command line validation or transformation. If you want to validate from a command line you can use the Xerces validator for which you have examples in the subfolder samples of the Xerces install folder or the LibXML validator. If your XML Schema is included in a more complex NVDL schema you can use the oNVDL library which is included in Oxygen but can be called also from command line.

For command line transformations you can use both the Saxon transformer, the Xalan one or the LibXSLT one.


Regards,
Sorin