Index: trunk/include/VBox/xml.h
===================================================================
--- trunk/include/VBox/xml.h	(revision 17572)
+++ trunk/include/VBox/xml.h	(revision 17573)
@@ -447,6 +447,10 @@
  */
 
-class Node;
-typedef std::list<const Node*> NodesList;
+class ElementNode;
+typedef std::list<const ElementNode*> ElementNodesList;
+
+class AttributeNode;
+
+class ContentNode;
 
 class VBOXXML_CLASS Node
@@ -464,33 +468,76 @@
     int getLineNumber() const;
 
-    int getChildElements(NodesList &children,
+    int isElement()
+    {
+        return mType == IsElement;
+    }
+
+protected:
+    typedef enum {IsElement, IsAttribute, IsContent} EnumType;
+    EnumType mType;
+
+    // hide the default constructor so people use only our factory methods
+    Node(EnumType type);
+    Node(const Node &x);      // no copying
+
+    void buildChildren();
+
+    /* Obscure class data */
+    struct Data;
+    Data *m;
+};
+
+class VBOXXML_CLASS ElementNode : public Node
+{
+public:
+    int getChildElements(ElementNodesList &children,
                          const char *pcszMatch = NULL) const;
 
-    const Node* findChildElement(const char *pcszMatch) const;
-    const Node* findChildElementFromId(const char *pcszId) const;
-
-    const Node* findAttribute(const char *pcszMatch) const;
+    const ElementNode* findChildElement(const char *pcszMatch) const;
+    const ElementNode* findChildElementFromId(const char *pcszId) const;
+
+    const AttributeNode* findAttribute(const char *pcszMatch) const;
     bool getAttributeValue(const char *pcszMatch, com::Utf8Str &str) const;
     bool getAttributeValue(const char *pcszMatch, int64_t &i) const;
     bool getAttributeValue(const char *pcszMatch, uint64_t &i) const;
 
-    Node* createChild(const char *pcszElementName);
-    Node* addContent(const char *pcszContent);
-    Node* setAttribute(const char *pcszName, const char *pcszValue);
-
-private:
+    ElementNode* createChild(const char *pcszElementName);
+    ContentNode* addContent(const char *pcszContent);
+    AttributeNode* setAttribute(const char *pcszName, const char *pcszValue);
+
+protected:
     // hide the default constructor so people use only our factory methods
-    Node();
-
+    ElementNode();
+    ElementNode(const ElementNode &x);      // no copying
+
+    friend class Node;
     friend class Document;
     friend class XmlFileParser;
-
-    Node(const Node &x);      // no copying
-
-    void buildChildren();
-
-    /* Obscure class data */
-    struct Data;
-    Data *m;
+};
+
+class VBOXXML_CLASS ContentNode : public Node
+{
+public:
+
+protected:
+    // hide the default constructor so people use only our factory methods
+    ContentNode();
+    ContentNode(const ContentNode &x);      // no copying
+
+    friend class Node;
+    friend class ElementNode;
+};
+
+class VBOXXML_CLASS AttributeNode : public Node
+{
+public:
+
+protected:
+    // hide the default constructor so people use only our factory methods
+    AttributeNode();
+    AttributeNode(const AttributeNode &x);      // no copying
+
+    friend class Node;
+    friend class ElementNode;
 };
 
@@ -503,7 +550,7 @@
 {
 public:
-    NodesLoop(const Node &node, const char *pcszMatch = NULL);
+    NodesLoop(const ElementNode &node, const char *pcszMatch = NULL);
     ~NodesLoop();
-    const Node* forAllNodes() const;
+    const ElementNode* forAllNodes() const;
 
 private:
@@ -527,7 +574,7 @@
     Document& operator=(const Document &x);
 
-    const Node* getRootElement() const;
-
-    Node* createRootElement(const char *pcszRootElementName);
+    const ElementNode* getRootElement() const;
+
+    ElementNode* createRootElement(const char *pcszRootElementName);
 
 private:
Index: trunk/src/VBox/Main/ApplianceImpl.cpp
===================================================================
--- trunk/src/VBox/Main/ApplianceImpl.cpp	(revision 17572)
+++ trunk/src/VBox/Main/ApplianceImpl.cpp	(revision 17573)
@@ -373,16 +373,16 @@
  */
 HRESULT Appliance::LoopThruSections(const char *pcszPath,
-                                    const xml::Node *pReferencesElem,
-                                    const xml::Node *pCurElem)
+                                    const xml::ElementNode *pReferencesElem,
+                                    const xml::ElementNode *pCurElem)
 {
     HRESULT rc;
 
     xml::NodesLoop loopChildren(*pCurElem);
-    const xml::Node *pElem;
+    const xml::ElementNode *pElem;
     while ((pElem = loopChildren.forAllNodes()))
     {
         const char *pcszElemName = pElem->getName();
         const char *pcszTypeAttr = "";
-        const xml::Node *pTypeAttr;
+        const xml::AttributeNode *pTypeAttr;
         if ((pTypeAttr = pElem->findAttribute("type")))
             pcszTypeAttr = pTypeAttr->getValue();
@@ -458,10 +458,10 @@
  */
 HRESULT Appliance::HandleDiskSection(const char *pcszPath,
-                                     const xml::Node *pReferencesElem,
-                                     const xml::Node *pSectionElem)
+                                     const xml::ElementNode *pReferencesElem,
+                                     const xml::ElementNode *pSectionElem)
 {
     // contains "Disk" child elements
     xml::NodesLoop loopDisks(*pSectionElem, "Disk");
-    const xml::Node *pelmDisk;
+    const xml::ElementNode *pelmDisk;
     while ((pelmDisk = loopDisks.forAllNodes()))
     {
@@ -484,5 +484,5 @@
             {
                 // look up corresponding /References/File nodes (list built above)
-                const xml::Node *pFileElem;
+                const xml::ElementNode *pFileElem;
                 if (    pReferencesElem
                      && ((pFileElem = pReferencesElem->findChildElementFromId(strFileRef.c_str())))
@@ -537,5 +537,5 @@
  */
 HRESULT Appliance::HandleNetworkSection(const char *pcszPath,
-                                        const xml::Node *pSectionElem)
+                                        const xml::ElementNode *pSectionElem)
 {
     // we ignore network sections for now
@@ -567,18 +567,18 @@
  */
 HRESULT Appliance::HandleVirtualSystemContent(const char *pcszPath,
-                                              const xml::Node *pelmVirtualSystem)
+                                              const xml::ElementNode *pelmVirtualSystem)
 {
     VirtualSystem vsys;
 
-    const xml::Node *pIdAttr = pelmVirtualSystem->findAttribute("id");
+    const xml::AttributeNode *pIdAttr = pelmVirtualSystem->findAttribute("id");
     if (pIdAttr)
         vsys.strName = pIdAttr->getValue();
 
     xml::NodesLoop loop(*pelmVirtualSystem);      // all child elements
-    const xml::Node *pelmThis;
+    const xml::ElementNode *pelmThis;
     while ((pelmThis = loop.forAllNodes()))
     {
         const char *pcszElemName = pelmThis->getName();
-        const xml::Node *pTypeAttr = pelmThis->findAttribute("type");
+        const xml::AttributeNode *pTypeAttr = pelmThis->findAttribute("type");
         const char *pcszTypeAttr = (pTypeAttr) ? pTypeAttr->getValue() : "";
 
@@ -590,5 +590,5 @@
             </EulaSection> */
 
-            const xml::Node *pelmInfo, *pelmLicense;
+            const xml::ElementNode *pelmInfo, *pelmLicense;
             if (    ((pelmInfo = pelmThis->findChildElement("Info")))
                  && ((pelmLicense = pelmThis->findChildElement("License")))
@@ -603,5 +603,5 @@
                 )
         {
-            const xml::Node *pelmSystem, *pelmVirtualSystemType;
+            const xml::ElementNode *pelmSystem, *pelmVirtualSystemType;
             if ((pelmSystem = pelmThis->findChildElement("System")))
             {
@@ -618,5 +618,5 @@
 
             xml::NodesLoop loopVirtualHardwareItems(*pelmThis, "Item");      // all "Item" child elements
-            const xml::Node *pelmItem;
+            const xml::ElementNode *pelmItem;
             while ((pelmItem = loopVirtualHardwareItems.forAllNodes()))
             {
@@ -626,5 +626,5 @@
 
                 xml::NodesLoop loopItemChildren(*pelmItem);      // all child elements
-                const xml::Node *pelmItemChild;
+                const xml::ElementNode *pelmItemChild;
                 while ((pelmItemChild = loopItemChildren.forAllNodes()))
                 {
@@ -1252,5 +1252,5 @@
                     doc);
 
-        const xml::Node *pRootElem = doc.getRootElement();
+        const xml::ElementNode *pRootElem = doc.getRootElement();
         if (strcmp(pRootElem->getName(), "Envelope"))
             return setError(VBOX_E_FILE_ERROR,
@@ -1267,6 +1267,6 @@
         // get all "File" child elements of "References" section so we can look up files easily;
         // first find the "References" sections so we can look up files
-        xml::NodesList listFileElements;      // receives all /Envelope/References/File nodes
-        const xml::Node *pReferencesElem;
+        xml::ElementNodesList listFileElements;      // receives all /Envelope/References/File nodes
+        const xml::ElementNode *pReferencesElem;
         if ((pReferencesElem = pRootElem->findChildElement("References")))
             pReferencesElem->getChildElements(listFileElements, "File");
@@ -2465,5 +2465,5 @@
     {
         xml::Document doc;
-        xml::Node *pelmRoot = doc.createRootElement("Envelope");
+        xml::ElementNode *pelmRoot = doc.createRootElement("Envelope");
 
         pelmRoot->setAttribute("ovf:version", "1.0");
@@ -2479,5 +2479,5 @@
 
         // <Envelope>/<References>
-        xml::Node *pelmReferences = pelmRoot->createChild("References");
+        xml::ElementNode *pelmReferences = pelmRoot->createChild("References");
                 // @ŧodo
 
@@ -2487,9 +2487,9 @@
                 <Disk ovf:capacity="4294967296" ovf:diskId="lamp" ovf:format="http://www.vmware.com/specifications/vmdk.html#compressed" ovf:populatedSize="1924967692"/>
             </DiskSection> */
-        xml::Node *pelmDiskSection = pelmRoot->createChild("DiskSection");
-        xml::Node *pelmDiskSectionInfo = pelmDiskSection->createChild("Info");
+        xml::ElementNode *pelmDiskSection = pelmRoot->createChild("DiskSection");
+        xml::ElementNode *pelmDiskSectionInfo = pelmDiskSection->createChild("Info");
         pelmDiskSectionInfo->addContent("List of the virtual disks used in the package");
         // @todo for each disk:
-        // xml::Node *pelmDisk = pelmDiskSection->createChild("Disk");
+        // xml::ElementNode *pelmDisk = pelmDiskSection->createChild("Disk");
 
         /* <Envelope>/<NetworkSection>:
@@ -2500,6 +2500,6 @@
                 </Network>
             </NetworkSection> */
-        xml::Node *pelmNetworkSection = pelmRoot->createChild("NetworkSection");
-        xml::Node *pelmNetworkSectionInfo = pelmNetworkSection->createChild("Info");
+        xml::ElementNode *pelmNetworkSection = pelmRoot->createChild("NetworkSection");
+        xml::ElementNode *pelmNetworkSectionInfo = pelmNetworkSection->createChild("Info");
         pelmNetworkSectionInfo->addContent("Logical networks used in the package");
         // for now, set up a map so we have a list of unique network names (to make
@@ -2509,6 +2509,6 @@
 
         // and here come the virtual systems:
-        xml::Node *pelmVirtualSystemCollection = pelmRoot->createChild("VirtualSystemCollection");
-        xml::Node *pattrVirtualSystemCollectionId = pelmVirtualSystemCollection->setAttribute("ovf:id", "ExportedVirtualBoxMachines");      // whatever
+        xml::ElementNode *pelmVirtualSystemCollection = pelmRoot->createChild("VirtualSystemCollection");
+        xml::AttributeNode *pattrVirtualSystemCollectionId = pelmVirtualSystemCollection->setAttribute("ovf:id", "ExportedVirtualBoxMachines");      // whatever
 
         list< ComObjPtr<VirtualSystemDescription> >::const_iterator it;
@@ -2520,6 +2520,6 @@
             ComObjPtr<VirtualSystemDescription> vsdescThis = (*it);
 
-            xml::Node *pelmVirtualSystem = pelmVirtualSystemCollection->createChild("VirtualSystem");
-            xml::Node *pelmVirtualSystemInfo = pelmVirtualSystem->createChild("Info");      // @todo put in description here after implementing an entry for it
+            xml::ElementNode *pelmVirtualSystem = pelmVirtualSystemCollection->createChild("VirtualSystem");
+            xml::ElementNode *pelmVirtualSystemInfo = pelmVirtualSystem->createChild("Info");      // @todo put in description here after implementing an entry for it
 
             std::list<VirtualSystemDescriptionEntry*> llName = vsdescThis->findByType(VirtualSystemDescriptionType_Name);
@@ -2530,5 +2530,5 @@
                     <Description>Linux 2.6.x</Description>
                 </OperatingSystemSection> */
-            xml::Node *pelmOperatingSystemSection = pelmVirtualSystem->createChild("OperatingSystemSection");
+            xml::ElementNode *pelmOperatingSystemSection = pelmVirtualSystem->createChild("OperatingSystemSection");
             pelmOperatingSystemSection->setAttribute("ovf:id", "82");
                     // @todo convert vbox OS type into OVF ID
@@ -2537,5 +2537,5 @@
 
             // <VirtualHardwareSection ovf:id="hw1" ovf:transport="iso">
-            xml::Node *pelmVirtualHardwareSection = pelmVirtualSystem->createChild("VirtualHardwareSection");
+            xml::ElementNode *pelmVirtualHardwareSection = pelmVirtualSystem->createChild("VirtualHardwareSection");
 
             /*  <System>
@@ -2546,8 +2546,8 @@
                     <vssd:VirtualSystemType>vmx-4</vssd:VirtualSystemType>
                 </System> */
-            xml::Node *pelmSystem = pelmVirtualHardwareSection->createChild("System");
+            xml::ElementNode *pelmSystem = pelmVirtualHardwareSection->createChild("System");
 
             // <vssd:VirtualSystemType>vmx-4</vssd:VirtualSystemType>
-            xml::Node *pelmVirtualSystemType = pelmSystem->createChild("VirtualSystemType");
+            xml::ElementNode *pelmVirtualSystemType = pelmSystem->createChild("VirtualSystemType");
             pelmVirtualSystemType->addContent("virtualbox-2.2");            // instead of vmx-7?
 
@@ -2677,5 +2677,5 @@
                 if (type)
                 {
-                    xml::Node *pItem;
+                    xml::ElementNode *pItem;
                     pItem = pelmVirtualHardwareSection->createChild("Item");
 
@@ -2714,7 +2714,7 @@
         {
             const Utf8Str &strNetwork = itN->first;
-            xml::Node *pelmNetwork = pelmNetworkSection->createChild("Network");
+            xml::ElementNode *pelmNetwork = pelmNetworkSection->createChild("Network");
             pelmNetwork->setAttribute("ovf:name", strNetwork.c_str());
-            pelmNetwork->createChild("<Description>")->addContent("Logical network used by this appliance.");
+            pelmNetwork->createChild("Description")->addContent("Logical network used by this appliance.");
         }
 
Index: trunk/src/VBox/Main/include/ApplianceImpl.h
===================================================================
--- trunk/src/VBox/Main/include/ApplianceImpl.h	(revision 17572)
+++ trunk/src/VBox/Main/include/ApplianceImpl.h	(revision 17573)
@@ -30,4 +30,5 @@
 {
     class Node;
+    class ElementNode;
 }
 
@@ -88,8 +89,8 @@
     Data *m;
 
-    HRESULT LoopThruSections(const char *pcszPath, const xml::Node *pReferencesElem, const xml::Node *pCurElem);
-    HRESULT HandleDiskSection(const char *pcszPath, const xml::Node *pReferencesElem, const xml::Node *pSectionElem);
-    HRESULT HandleNetworkSection(const char *pcszPath, const xml::Node *pSectionElem);
-    HRESULT HandleVirtualSystemContent(const char *pcszPath, const xml::Node *pContentElem);
+    HRESULT LoopThruSections(const char *pcszPath, const xml::ElementNode *pReferencesElem, const xml::ElementNode *pCurElem);
+    HRESULT HandleDiskSection(const char *pcszPath, const xml::ElementNode *pReferencesElem, const xml::ElementNode *pSectionElem);
+    HRESULT HandleNetworkSection(const char *pcszPath, const xml::ElementNode *pSectionElem);
+    HRESULT HandleVirtualSystemContent(const char *pcszPath, const xml::ElementNode *pContentElem);
 
     HRESULT searchUniqueVMName(Utf8Str& aName) const;
Index: trunk/src/VBox/Main/xml/xml.cpp
===================================================================
--- trunk/src/VBox/Main/xml/xml.cpp	(revision 17572)
+++ trunk/src/VBox/Main/xml/xml.cpp	(revision 17573)
@@ -427,5 +427,5 @@
 
     // attributes, if this is an element; can be empty
-    typedef std::map<const char*, boost::shared_ptr<Node>, compare_const_char > AttributesMap;
+    typedef std::map<const char*, boost::shared_ptr<AttributeNode>, compare_const_char > AttributesMap;
     AttributesMap attribs;
 
@@ -435,6 +435,7 @@
 };
 
-Node::Node()
-    : m(new Data)
+Node::Node(EnumType type)
+    : mType(type),
+      m(new Data)
 {
     m->plibNode = NULL;
@@ -455,5 +456,5 @@
     {
         const char *pcszAttribName = (const char*)plibAttr->name;
-        boost::shared_ptr<Node> pNew(new Node);
+        boost::shared_ptr<AttributeNode> pNew(new AttributeNode);
         pNew->m->plibAttr = plibAttr;
         pNew->m->pcszName = (const char*)plibAttr->name;
@@ -469,6 +470,11 @@
     while (plibNode)
     {
-        // create a new Node for this child element
-        boost::shared_ptr<Node> pNew(new Node);
+        boost::shared_ptr<Node> pNew;
+
+        if (plibNode->name)
+            pNew = boost::shared_ptr<Node>(new ElementNode);
+        else
+            pNew = boost::shared_ptr<Node>(new ContentNode);
+
         pNew->m->plibNode = plibNode;
         pNew->m->pcszName = (const char*)plibNode->name;
@@ -593,4 +599,9 @@
 }
 
+ElementNode::ElementNode()
+    : Node(IsElement)
+{
+}
+
 /**
  * Builds a list of direct child elements of the current element that
@@ -601,6 +612,6 @@
  * @return Number of items appended to the list (0 if none).
  */
-int Node::getChildElements(NodesList &children,
-                              const char *pcszMatch /*= NULL*/)
+int ElementNode::getChildElements(ElementNodesList &children,
+                                  const char *pcszMatch /*= NULL*/)
     const
 {
@@ -618,5 +629,7 @@
            )
         {
-            children.push_back((*it).get());
+            Node *pNode = (*it).get();
+            if (pNode->isElement())
+                children.push_back(static_cast<ElementNode*>(pNode));
             ++i;
         }
@@ -630,5 +643,5 @@
  * @return
  */
-const Node* Node::findChildElement(const char *pcszMatch)
+const ElementNode* ElementNode::findChildElement(const char *pcszMatch)
     const
 {
@@ -640,6 +653,10 @@
          ++it)
     {
-        if (!strcmp(pcszMatch, (**it).getName())) // the element name matches
-            return (*it).get();
+        if ((**it).isElement())
+        {
+            ElementNode *pelm = static_cast<ElementNode*>((*it).get());
+            if (!strcmp(pcszMatch, pelm->getName())) // the element name matches
+                return pelm;
+        }
     }
 
@@ -652,5 +669,5 @@
  * @return child element or NULL if not found.
  */
-const Node* Node::findChildElementFromId(const char *pcszId) const
+const ElementNode* ElementNode::findChildElementFromId(const char *pcszId) const
 {
     Data::InternalNodesList::const_iterator
@@ -661,10 +678,13 @@
          ++it)
     {
-        const Node *pElem = (*it).get();
-        const Node *pAttr;
-        if (    ((pAttr = pElem->findAttribute("id")))
-             && (!strcmp(pAttr->getValue(), pcszId))
-           )
-            return pElem;
+        if ((**it).isElement())
+        {
+            ElementNode *pelm = static_cast<ElementNode*>((*it).get());
+            const AttributeNode *pAttr;
+            if (    ((pAttr = pelm->findAttribute("id")))
+                 && (!strcmp(pAttr->getValue(), pcszId))
+               )
+                return pelm;
+        }
     }
 
@@ -677,5 +697,5 @@
  * @return
  */
-const Node* Node::findAttribute(const char *pcszMatch) const
+const AttributeNode* ElementNode::findAttribute(const char *pcszMatch) const
 {
     Data::AttributesMap::const_iterator it;
@@ -696,5 +716,5 @@
  * @return TRUE if attribute was found and str was thus updated.
  */
-bool Node::getAttributeValue(const char *pcszMatch, com::Utf8Str &str) const
+bool ElementNode::getAttributeValue(const char *pcszMatch, com::Utf8Str &str) const
 {
     const Node* pAttr;
@@ -718,5 +738,5 @@
  * @return TRUE if attribute was found and str was thus updated.
  */
-bool Node::getAttributeValue(const char *pcszMatch, int64_t &i) const
+bool ElementNode::getAttributeValue(const char *pcszMatch, int64_t &i) const
 {
     com::Utf8Str str;
@@ -739,5 +759,5 @@
  * @return TRUE if attribute was found and str was thus updated.
  */
-bool Node::getAttributeValue(const char *pcszMatch, uint64_t &i) const
+bool ElementNode::getAttributeValue(const char *pcszMatch, uint64_t &i) const
 {
     com::Utf8Str str;
@@ -757,5 +777,5 @@
  * @return
  */
-Node* Node::createChild(const char *pcszElementName)
+ElementNode* ElementNode::createChild(const char *pcszElementName)
 {
     // we must be an element, not an attribute
@@ -771,6 +791,6 @@
 
     // now wrap this in C++
-    Node *p = new Node;
-    boost::shared_ptr<Node> pNew(p);
+    ElementNode *p = new ElementNode;
+    boost::shared_ptr<ElementNode> pNew(p);
     pNew->m->plibNode = plibNode;
     pNew->m->pcszName = (const char*)plibNode->name;
@@ -789,10 +809,6 @@
  * @return
  */
-Node* Node::addContent(const char *pcszContent)
-{
-    // we must be an element, not an attribute
-    if (!m->plibNode)
-        throw ENodeIsNotElement(RT_SRC_POS);
-
+ContentNode* ElementNode::addContent(const char *pcszContent)
+{
     // libxml side: create new node
     xmlNode *plibNode;
@@ -802,6 +818,6 @@
 
     // now wrap this in C++
-    Node *p = new Node;
-    boost::shared_ptr<Node> pNew(p);
+    ContentNode *p = new ContentNode;
+    boost::shared_ptr<ContentNode> pNew(p);
     pNew->m->plibNode = plibNode;
     pNew->m->pcszName = NULL;
@@ -813,6 +829,5 @@
 
 /**
- * Sets the given attribute. Assumes that "this" is an element node,
- * otherwise ENodeIsNotElement is thrown.
+ * Sets the given attribute.
  *
  * If an attribute with the given name exists, it is overwritten,
@@ -824,10 +839,6 @@
  * @return
  */
-Node* Node::setAttribute(const char *pcszName, const char *pcszValue)
-{
-    // we must be an element, not an attribute
-    if (!m->plibNode)
-        throw ENodeIsNotElement(RT_SRC_POS);
-
+AttributeNode* ElementNode::setAttribute(const char *pcszName, const char *pcszValue)
+{
     Data::AttributesMap::const_iterator it;
 
@@ -840,5 +851,5 @@
 
         // C++ side: create an attribute node around it
-        boost::shared_ptr<Node> pNew(new Node);
+        boost::shared_ptr<AttributeNode> pNew(new AttributeNode);
         pNew->m->plibAttr = plibAttr;
         pNew->m->pcszName = (const char*)plibAttr->name;
@@ -858,4 +869,14 @@
 
 
+AttributeNode::AttributeNode()
+    : Node(IsAttribute)
+{
+}
+
+ContentNode::ContentNode()
+    : Node(IsContent)
+{
+}
+
 /*
  * NodesLoop
@@ -865,9 +886,9 @@
 struct NodesLoop::Data
 {
-    NodesList listElements;
-    NodesList::const_iterator it;
+    ElementNodesList listElements;
+    ElementNodesList::const_iterator it;
 };
 
-NodesLoop::NodesLoop(const Node &node, const char *pcszMatch /* = NULL */)
+NodesLoop::NodesLoop(const ElementNode &node, const char *pcszMatch /* = NULL */)
 {
     m = new Data;
@@ -897,7 +918,7 @@
  * @return
  */
-const Node* NodesLoop::forAllNodes() const
-{
-    const Node *pNode = NULL;
+const ElementNode* NodesLoop::forAllNodes() const
+{
+    const ElementNode *pNode = NULL;
 
     if (m->it != m->listElements.end())
@@ -919,5 +940,5 @@
 {
     xmlDocPtr   plibDocument;
-    Node        *pRootElement;
+    ElementNode *pRootElement;
 
     Data()
@@ -986,5 +1007,5 @@
 void Document::refreshInternals() // private
 {
-    m->pRootElement = new Node();
+    m->pRootElement = new ElementNode();
     m->pRootElement->m->plibNode = xmlDocGetRootElement(m->plibDocument);
     m->pRootElement->m->pcszName = (const char*)m->pRootElement->m->plibNode->name;
@@ -997,5 +1018,5 @@
  * @return
  */
-const Node* Document::getRootElement() const
+const ElementNode* Document::getRootElement() const
 {
     return m->pRootElement;
@@ -1006,5 +1027,5 @@
  * only work if the document is empty; otherwise EDocumentNotEmpty is thrown.
  */
-Node* Document::createRootElement(const char *pcszRootElementName)
+ElementNode* Document::createRootElement(const char *pcszRootElementName)
 {
     if (m->pRootElement || m->plibDocument)
@@ -1020,5 +1041,5 @@
 
     // now wrap this in C++
-    m->pRootElement = new Node();
+    m->pRootElement = new ElementNode();
     m->pRootElement->m->plibNode = plibRootNode;
     m->pRootElement->m->pcszName = (const char*)plibRootNode->name;
