Not sure if this is the only way, but... Use XPath (if you like) to get the Node where you want to add, then invoke node.add([<Element>|<Attribute> object]) or addElement("Name").setText("text") or addAttribute("Name").setText("text")
for example. jean pujol <[EMAIL PROTECTED] To: [EMAIL PROTECTED] > cc: Sent by: Subject: [dom4j-user] Insert Element thanks to XPath [EMAIL PROTECTED] ceforge.net 10/23/2003 12:06 PM Hello, I've been using DOM4J since...this morning, and I would like to know if it's possible to insert an Element at a location specified by an XPath of the form "/node()[1]/node()[3]/.../node()[2]". I've read some threads on this mailing list related to inserting elements at chosen locations, but I didn't figure out how to do that. Thanks in advance, Jean ------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user ------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user