mujahid007 at home.com
Wed Aug 8 22:23:22 PDT 2001
I have an xml document that contains sql queries in form of processing
instructions. I want to read in the document, run the queries contained
by the PIs and replace the PI with data returned by the queries.
So if we have this:
<?query sql="SELECT * from x"?>
<?query sql="SELECT * FROM y"?>
after processing the above document we would have
I can accomplish this by building my own Content Handler and capturing
the callbacks using SAX. So as I start to read the file using SAX, I can
write another one out. So this way the new file will contain the
original xml structure + the new data fetched by the sql queries.
Alternatively, I can use the SAXBuilder to build a JDOM document,
traverse through each element looking for PIs and handling them
My question is if the xml file is really big, like lets say 1 MB, which
way would be more efficient? I dont really understand what a JDOM
Document is so hoping that maybe some one can help me out.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jdom-interest