Hi Neil : 

In Java, I want to be able to validate an XML document that I parse against
my own schema.  Is it sufficient to setFeature() for validation = true on
the DOM Parser to validate an XML file against a schema like in DOMCount?
I need to be able to return errors if an attribute or element is required
and null, and check for constraints on their respective values.  Does
DOMCount cover that functionality or do I have to write a more
sophisticated version? If it is the case that DOMCount code does not
satisfy this type of validation, is there an example that covers this
scenario?  I did come accross an article that describes a framework in Java
for the type of validation I am referring to -  
It is at:
http://javaworld.com/javaworld/jw-09-2000/jw-0908-validation.html

Thanks, 
Vanessa 



At 2/9/01 02:29 PM, you wrote:
>
>
>Hi Vanessa,
>
>I'm not quite sure what you're after so I'll give you an idea of what
>Xerces has to offer:
>
>There are various small sample programs shipped with Xerces (like
>dom.DOMCount and sax.SAXCount, both found in the xercesSamples.jar file)
>which you can use to determine if a given document conforms to its schema.
>If you're after something more than a simple command-line tool, then you
>should look at the DOM, SAX or JAXP API's (depending on your needs).  The
>Xerces distribution includes docs for all three of these API's.
>
>Hope that helps,
>Neil
>
>Neil Graham
>XML Parser Development
>IBM Toronto Lab
>Phone:  416-448-3519, T/L 778-3519
>E-mail:  [EMAIL PROTECTED]
>
>
>
>Vanessa D Johnson <[EMAIL PROTECTED]> on 02/09/2001 01:49:29
>PM
>
>Please respond to [EMAIL PROTECTED]
>
>To:   [EMAIL PROTECTED]
>cc:
>Subject:  Validating XML docs against schema
>
>
>Hello:
>
>Is there a class in the xerces API that enables one to validate an XML
>document against a particular schema?
>
>Thanks,
>Vanessa Johnson
>
>
>
>---------------------------------------------------------------------
>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]


Vanessa D. Johnson 
Mission Execution and Automation 
Section 368
Jet Propulsion Laboratory
voice: (818) 354-3885

Reply via email to