ca_iancu schrieb: >> Can you provide a little more details, xmlfile how it is and how it > More details, certainly! I need to find/read/duplicate a section of an xml > file, then append it and make a simple change to the added section. I need > to go from: > > <?xml version="1.0" encoding="UTF-8"?> > <root> > <device> > <device name="some_device"> > ..........a number of lines of properties here (irrelevant, unchanged) > </device> > </device> > </root>
hm, still not clear for me ... > to the following: > > <?xml version="1.0" encoding="UTF-8"?> > <root> > <device> > <device name="some_device"> > ..........a number of lines of properties here (irrelevant, unchanged) > </device> > > <device name="some_other_new_device"> > ..........a number of lines of properties here (irrelevant, unchanged) > </device> > </device> > </root> you mean copy one name attribute <device> <device name="attribute to copy"> <device name="..."> ... </device> and append it as <device> <device name="copy of attribute to copy"> <device name="..."> ... </device> ?? > That's it. The problem for me is: copy the text in a variable, then append > right after the end of the existing text. I briefly looked at the xmltask > but it seemed like what it does is read an xml file, and then it sets the > existing fields to ant properties. It didn't seem like it's something I > could use for text processing. oh, the xml task is great for editing xml files, that's what xmltask is made for ;-) Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]