\r
return newValue;\r
}\r
+\r
+void AbstractXMLObject::detach()\r
+{\r
+ if (!getParent())\r
+ return;\r
+ else if (getParent()->hasParent())\r
+ throw XMLObjectException("Cannot detach an object whose parent is itself a child.");\r
+\r
+ // Pull ourselves out of the parent and then blast him.\r
+ getParent()->removeChild(this);\r
+ delete m_parent;\r
+ m_parent = NULL;\r
+}\r