virtual XMLObject* clone() const=0;\r
\r
/**\r
+ * Specialized function for detaching a child object from its parent\r
+ * <strong>while disposing of the parent</strong>.\r
+ *\r
+ * This is not a generic way of detaching any child object, but only of\r
+ * pruning a single child from the root of an XMLObject tree. If the\r
+ * detached XMLObject's parent is itself a child, an exception will be\r
+ * thrown. It's mainly useful for turning a child into the new root of\r
+ * the tree without having to clone the child.\r
+ */\r
+ virtual void detach()=0;\r
+\r
+ /**\r
* Gets the QName for this element. This QName <strong>MUST</strong> \r
* contain the namespace URI, namespace prefix, and local element name.\r
* \r
virtual const std::list<XMLObject*>& getOrderedChildren() const=0;\r
\r
/**\r
+ * Used by a child's detach method to isolate the child from\r
+ * this parent object in preparation for destroying the parent\r
+ * (this object).\r
+ * \r
+ * @param child the child object to remove\r
+ */\r
+ virtual void removeChild(XMLObject* child)=0;\r
+\r
+ /**\r
* Gets the DOM representation of this XMLObject, if one exists.\r
* \r
* @return the DOM representation of this XMLObject\r