How can i add element and value in XML?

wahsi

New Member
I have this XML file:
(Actually, right now it is a StringBuffer, i don't want to save it to a file, i want to use it from the memory directly)\[code\]StringBuffer book = <book> <title>test</title> <bookinfo> <page>100</page> </bookinfo></book>\[/code\]In here, i want to add a element and a value like this:\[code\]<book> <title>test</title> <bookinfo> <page>100</page> <price>100</price> </bookinfo></book>\[/code\]what is the fast and easiest way to add an element and value in XML?
 
Back
Top