>From the command line using one of the delivered samples (xerces-j
2_6_2):

cd xerces-2_6_2
java -cp "./xercesSamples.jar" xni/XMLGrammarBuilder -p
org.apache.xerces.parsers.XML11Configuration -a your.xsd -f -I your.xml

If there are no errors, the xsd and xml are OK.  It will complain if
there are errors.

 

-----Original Message-----
From: Allison Bloodworth [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 28, 2005 5:20 PM
To: [email protected]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Invoking schema validator from the command line

Thanks to Paul & George for pointing me to this page, but I am still
lost on how to validate an XML instance against a schema! I tried to
find out what the examples on this page
(http://xerces.apache.org/xerces2-j/samples-sax.html#Counter)
corresponded to in the API Documentation
(http://xerces.apache.org/xerces-j/apiDocs/index.html) in hopes that
would shed some light on things, but I think I'm missing some basic java
knowledge here. I assume the classes in the API documents NOT something
you can invoke from the command line? Where is the info on what can be
invoked on the command line?

Is there a simple command I can use to do this validation at the command
line? Or do I have to write an actual program which instantiates objects
using the classes in the API documentation in order to accomplish this?
If so, has someone who has done this already be willing to share their
program with me?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, November 28, 2005 2:25 PM
To: [email protected]
Cc: [email protected]; [EMAIL PROTECTED]
Subject: RE: Invoking schema validator from the command line

> Actually, I misspoke. I'm trying to validate an instance document
against a
> schema I created. I'm getting errors in XML Spy that don't make sense
and
> the xml-dev list recommended I use Xerces to check it since it was a
better
> implementation of the spec. So any pointers would be welcome
here...thanks!

Have a look at:

        http://xerces.apache.org/xerces2-j/samples-sax.html#Counter

pvb

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to