Add or delete child tags
Members are added using XMLCloneNode() and removed with XMLDeleteMember(). XMLCloneNode() takes a dictionary of new members and their values and adds them to a copy of the specified node which is then returned as a result of the call. This enables addition of multiple members at the same time:
MembersDict = Dictionary(0); MembersDict["ISBN"] = XMLCreateNode("01234567890"); MembersDict["SubTitle"] = XMLCreateNode("All the RPC you’ll ever need!"); XMLNode\catalog\book = XMLCloneNode(XML\catalog\book, MembersDict);
Results in the following XMLNode tree (building on the book example shown in earlier topics).
Deleting a member requires the use of XMLDeleteMember() specifying the XMLNode and the member, as shown:
XMLDeleteMember(XMLNode\catalog\book, "ISBN");
Note that the deletion is done ‘in-place’.