I am working on a CCX script where I need to add and remove entries from an XML document. The XML document will have a single root element with several child elements that need to be added and removed. Is there a way to append a new child element to the root?
Example:
Simple XML to start
<reservations>
<reservation>
<name>John</name>
</reservation>
</reservations>
in the script I need to add another reservation to the bottom so it looks like this.
<reservations>
<reservation>
<name>John</name>
</reservation>
<reservation>
<name>Jill</name>
</reservation>
</reservations>
I will then need to remove an element from the script so that after the removal it looks like.
<reservations>
<reservation>
<name>Jill</name>
</reservation>
</reservations>