Initial unit test plus fixes
[shibboleth/xmltooling.git] / xmltooling / util / XMLHelper.h
index 9cf69b9..3642029 100644 (file)
@@ -95,8 +95,17 @@ namespace xmltooling {
          * @return  true iff the element's qualified name matches the other parameters\r
          */\r
         static bool isElementNamed(const DOMElement* e, const XMLCh* ns, const XMLCh* local) {\r
-            return (e && !XMLString::compareString(ns,e->getNamespaceURI()) && !XMLString::compareString(local,e->getLocalName()));\r
+            return (e && XMLString::equals(ns,e->getNamespaceURI()) && XMLString::equals(local,e->getLocalName()));\r
         }\r
+\r
+        /**\r
+         * Serializes the DOM Element provided into a buffer using UTF-8 encoding and\r
+         * the default XML serializer available. No manipulation or formatting is applied.\r
+         * \r
+         * @param e     element to serialize\r
+         * @param buf   buffer to serialize element into\r
+         */\r
+        static void serialize(const DOMElement* e, std::string& buf);\r
     };\r
 \r
 };\r