Hi Guys,

I'm little confusing with Schema validating with Xerces-J using JAXP API .

(1)  According to the [1] doc
DocumentBuilderFactory.#setValidating(boolean) is used for validate
with the DTD , if i want to use XMLShema i should use
DocumentBuilderFactory.#setSchema(Schema) where Schema object is load
through the SchemaFactory.

(2) I found following doc[2] , According to that it is possible to use
DocumentBuilderFactory.#setValidating(boolean)  method to validate
with XMLShema , together with
"http://java.sun.com/xml/jaxp/properties/schemaLanguage"; and
"http://java.sun.com/xml/jaxp/properties/schemaSource"; properties.

Both of above approaches worked with me , but I'm confusing with
whether both approaches leads me in to same results or any difference
of them. I couldn't find any comparison about these two , I'm really
appreciate if some one can explain differences or provide a good
reference to me .


[1] - 
http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/parsers/DocumentBuilderFactory.html#setValidating(boolean)
[2]-  http://www.j2ee.me/j2ee/1.4/docs/tutorial/doc/JAXPDOM8.html

Regards,

Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to