Re: [xml] external DTD validation of large XML's

XMLStarlet does this too, maybe it will be useful for you:;a=blob;f=src/xml_validate.c;hb=HEAD

Thank you for this link and taking the time to give helpful answers to jumpstart my libxml2 knowledge.

I'll check how you validate via libxml2 in XMLStarlet as my eventual goal is to statically link an xml 
processor and lua into a single scriptable host exe for easy deployment/use by my developers.  Sort of like single file executables.

Question...after skimming your should;a=blob;;h=21d647fc71f443578e35e188b9cb7135e031ce1d;hb=HEAD#l80

link against ws2_32 instead of wsock32?

2) Does the following mean that when using libxml2's SAX functionality a document representation of the 
entire input XML is created in memory?

No, it depends on the handler in use. The code you reference there is
checking for unexpected creation of DOM tree: unexpected because neither
the emptySAXHandler nor the debugSAXHandler create a DOM tree.

Ah, I see. As none of xmllint's SAX callbacks are creating memory structures, memory usage is likely 
determined by the parser and it's context's needs.

3) As of v2.7.8 and using the Reader API, there is no way to validate using an external DTD similar to

Yes, see

2005?...probably not enough demand/interest to make this happen. The world's moved to XSDs and only we poor 
schmos with clients refusing to move from legacy DTDs care about this anymore ;)

And I hate the idea autoconverting their "golden" DTDs into XSDs and likely having to cleanup after the 
conversion tool. Or spending time persuading folks that the converted XSD is still just as "golden" as the 


twitter: @jonforums

"Anyone who can only think of one way to spell a word obviously lacks imagination." - Mark Twain

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]