Can validate a XML against XSD from command line?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
pstein
Posts: 17
Joined: Wed May 21, 2008 9:13 pm

Can validate a XML against XSD from command line?

Post 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
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

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

Post 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
Post Reply