Adding new Attributes and Elements
<TITLE>Ulysses</TITLE>
<AUTHOR>Joyce, James</AUTHOR>
<PUBLISHER>Hi Books</PUBLISHER>
<DESCRIPTION>A <B>very</B> thick book.</DESCRIPTION>
</BOOK>;
Modify existing element or attribute
novel.@ISBN = "015687982928";
Result:
Adding new elements
novel.SETTING.COUNTRY = "Italy";
Result:
<TITLE>Last Ulysses</TITLE>
<AUTHOR>Joyce, James</AUTHOR>
<PUBLISHER>Hi Books</PUBLISHER>
<DESCRIPTION>A <B>very</B> thick book.</DESCRIPTION>
<SETTING>
<CITY>Rome</CITY>
<COUNTRY>Italy</COUNTRY>
</SETTING>
</BOOK>
Adding new attributes
novel.SETTING.@COUNTRY = "Italy";
Result:
<TITLE>Last Ulysses</TITLE>
<AUTHOR>Joyce, James</AUTHOR>
<PUBLISHER>Hi Books</PUBLISHER>
<DESCRIPTION>A <B>very</B> thick book.</DESCRIPTION>
<SETTING CITY="Rome" COUNTRY="Italy" />
</BOOK>
Adding new child after a specific existing child
Adding new child before a specific existing child
Adding new child before all existing child
Deleting Elements and Attributes
delete novel.@ISBN;//Removes the ISBN attribute from the <BOOK> element.
delete novel.TITLE;
//Removes the <TITLE> element from the <BOOK> element.
delete novel.*;
//Removes the <TITLE>, <AUTHOR>, <PUBLISHER>, etc. elements from the <BOOK> element.
delete novel.TITLE.*;
//Removes the text content from the <TITLE> element.
delete novel.@*;
//Removes all attributes.
<TITLE>Last Ulysses</TITLE>
<AUTHOR>Joyce, James</AUTHOR>
<PUBLISHER>Hi Books</PUBLISHER>
<DESCRIPTION>A <B>very</B> thick book.</DESCRIPTION>
</BOOK>