X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2Futil%2FXMLHelper.h;h=3642029b2f44275e2d1f7b6f712733648d72a116;hb=0a0e8cb2f639378ada23693a9ae5b2283effb1a5;hp=9cf69b96d45ed84b45f2071cf07940cf34a3ef7c;hpb=f0afcfec405b303bc2703ecca4f627c6bd992258;p=shibboleth%2Fxmltooling.git diff --git a/xmltooling/util/XMLHelper.h b/xmltooling/util/XMLHelper.h index 9cf69b9..3642029 100644 --- a/xmltooling/util/XMLHelper.h +++ b/xmltooling/util/XMLHelper.h @@ -95,8 +95,17 @@ namespace xmltooling { * @return true iff the element's qualified name matches the other parameters */ static bool isElementNamed(const DOMElement* e, const XMLCh* ns, const XMLCh* local) { - return (e && !XMLString::compareString(ns,e->getNamespaceURI()) && !XMLString::compareString(local,e->getLocalName())); + return (e && XMLString::equals(ns,e->getNamespaceURI()) && XMLString::equals(local,e->getLocalName())); } + + /** + * Serializes the DOM Element provided into a buffer using UTF-8 encoding and + * the default XML serializer available. No manipulation or formatting is applied. + * + * @param e element to serialize + * @param buf buffer to serialize element into + */ + static void serialize(const DOMElement* e, std::string& buf); }; };