I would like to write some content to a XML file. For that I have created a XML file and writen tags with element, attribute and value with some data like this:
XmlSerializer serializer = Xml.newSerializer();
serializer.startTag(null, element);
serializer.attribute(null, atbname, value);
serializer.text(text);
serializer.endTag(null, tag);
If I want to add a new tag with new elements, new attributes, etc. and I enter the element at the place of tag it is modifying with previous the tag.
How can I append the new tag to the previously appended tags?
Take a look at this link. It should give you an idea of how to add nodes to your XML. Here is a snippet.