I need to create multiple Child Nodes in one element node in XML, do I just append as many times as required to create these nodes? Like this:
rootElement.appendChild(creator);
creator.appendChild(name);
creator.appendChild(email);
creator.appendChild(name);
creator.appendChild(email);
Or does java automatically create the extra child nodes whenever I do this:
name.appendChild(doc.createTextNode("Bob"));
email.appendChild(doc.createTextNode("[email protected]"));
name.appendChild(doc.createTextNode("Smith"));
email.appendChild(doc.createTextNode("[email protected]"));
I'm not too sure how it works, any advice or help would be appreciated!