Just to let you now that I made an adapter between XNI and DOM that will do just what you describe here, I have already made similar adapters from XNI to JDOM / XOM and SAX and they all seem to work quite ok...
Just let me know if you are interested in this...
Mik
Schmidlin Franck, Home wrote:
Hello there.
I am currently trying to validate XML documents against XSD schemas, using xerces 2_4_0.
It all works beautifully when I validate at parse time, thank you.
However, my particular application requires me to validate documents that are already parsed and in a DOM Document.
I could serialize the DOM to a string and parse that string again, but that seems like a waste.
Even if I were to create a InputSource around the DOM, or a DomReader, by the time I hit the parse() method, we are again processing strings.
I would prefer to by-pass the parsing and just walk the DOM tree to generate whatever (SAX? XNI?) events are required to run the validation.
I am really struggling to find out where is the most appropriate place to plug in my code?
Where should I look for the code that calls the validation?
XMLParserConfiguration seemed like a good place to start, but between interfaces and factories, the decoupling makes it hard to follow the code.
Please note that I am not a xerces source expert, and I do not build it myself: I just peruse the code.
Any help would be much appreciated.
Thanks
Franck
Scanned for viruses by MessageLabs. The integrity and security of this message cannot be guaranteed. This email is intended for the named recipient only, and may contain confidential information and proprietary material. Any unauthorised use or disclosure is prohibited.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
