You can just go ahead and modify the document. A
Branch (Document or Element) has methods to add new content...
Element element =
doc.getRootElement();
element.addText( "foo" );
as well as to return an 'active' List of the nodes,
so you can use the List API from Java 2 Collections to modify the contents of a
Document or Element
List list = doc.content();
list.clear();
etc.
You might find these documents
useful...
James
----- Original Message -----
Sent: Friday, June 14, 2002 1:03 PM
Subject: [dom4j-user] Document
Updates
Dear
All
Apologies
if this is trivial, I am new to XML
I have
created a large document with dom4j nice and
easy.
However
I now need to dynamically provide updates made to the document elements. Is
there a standard way to do this or do I have to manually keep track of the
modifications.
Can
anyone point me in the right direction?
TIA
Andrew
Rendle
+44 (0) 117 962 8131
+44 (0) 7973 878 454
(m)
+44 (0) 117 976 1743
(f)
NOTICE: This email message is for the
sole use of the intended recipient(s) and may contain confidential
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply email and delete all copies of the original
message.
|