[jdom-interest] servlet: grabs existing xml1 -> inserts into -> rewrites xml1 on server

Robert Koberg rob at koberg.com
Fri Apr 27 10:24:47 PDT 2001


Hello all,

Is there an example or can someone tell me the best way to handle something
like this:

I have an existing XML file on the server that needs to be read, written to
and saved. I am using Xalan and Xerces. The XML looks something like:

<section id="abc">
...<section id="abc.a">
......<section id="abc.a.1">
.........<!-- inserted xml should go here -->
......</section>
......<section id="abc.a.2">
......</section>
...</section>
...<section id="abc.b">
...</section>
...<section id="abc.c">
...</section>
</section>

Then perhaps I need to insert the following text/xml in at
//section[@id='abc.a.2']:
<page>
    <content>aaa.xml</content>
</page>

The file needs to saved over the original with the new text inserted in the
appropriate place. Then the file will get transformed with XSLT to HTML to
be sent back to the browser.

Thanks,
Rob





More information about the jdom-interest mailing list