Multi-line svn commit, see body.
[shibboleth/cpp-xmltooling.git] / xmltooling / impl / AnyElement.cpp
index 0b95d34..bdb3ccc 100644 (file)
@@ -52,19 +52,7 @@ AnyElementImpl::AnyElementImpl(const AnyElementImpl& src) : AbstractXMLObject(sr
 }       
 
 void AnyElementImpl::marshallAttributes(DOMElement* domElement) const {
-    for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
-        DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
-        if (i->first.hasPrefix())
-            attr->setPrefix(i->first.getPrefix());
-        attr->setNodeValue(i->second);
-        domElement->setAttributeNode(attr);
-    }
-}
-
-void AnyElementImpl::marshallElementContent(DOMElement* domElement) const {
-    if(getTextContent()) {
-        domElement->appendChild(domElement->getOwnerDocument()->createTextNode(getTextContent()));
-    }
+    marshallExtensionAttributes(domElement);
 }
 
 void AnyElementImpl::processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
@@ -72,12 +60,7 @@ void AnyElementImpl::processChildElement(XMLObject* childXMLObject, const DOMEle
 }
 
 void AnyElementImpl::processAttribute(const DOMAttr* attribute) {
-    QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix()); 
-    setAttribute(q,attribute->getNodeValue());
-}
-
-void AnyElementImpl::processElementContent(const XMLCh* elementContent) {
-    setTextContent(elementContent);
+    unmarshallExtensionAttribute(attribute);
 }
 
 XMLObject* AnyElementBuilder::buildObject(