Is there any way to perform Validation this way while reading in the document from an 
xml file?  I looked at SAXReader and I didn't see any way to implement the 
ValidatorHandler.  Am I just missing something or do I really have to parse in the XML 
document in full and then write it out to validate it by a schema?  This seems a bit 
much...  TIA!


Chris Golden


On Sat, 16 Feb 2002 10:25:25 -0000, James Strachan wrote:
>Hi Chris
>
>The MSV method you're looking at probably takes a W3C Node interface
>rather than an org.dom4j.Node interface.
>
>There's a sample program in the dom4j/src/validate/JARVDemo.java that
>demonstrates how to use MSV with dom4j. The trick is to use a
>VerifierHandler and a dom4j SAXWriter to pipe SAX events into MSV.
>e.g.
>adding these few methods instead of the "return
>verifier.verify(doc);" line
>
>
>����VerifierHandler handler = verifier.getVerifierHandler();
>����SAXWriter writer = new SAXWriter( handler );
>����writer.write( document );
>
>James


_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to