X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2Futil%2FXMLHelper.cpp;h=9ebde32806f2b2de5eae3be00075cadb64042d61;hb=30654333446e3148ff35914b2fe087da0719889b;hp=87a165c617a313baacac5d9ccec924e53af0b198;hpb=a79eaef63f0772d90acbeedb5966653b50f3bd2f;p=shibboleth%2Fcpp-xmltooling.git diff --git a/xmltooling/util/XMLHelper.cpp b/xmltooling/util/XMLHelper.cpp index 87a165c..9ebde32 100644 --- a/xmltooling/util/XMLHelper.cpp +++ b/xmltooling/util/XMLHelper.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,8 @@ #include "internal.h" #include "exceptions.h" +#include "QName.h" +#include "XMLObject.h" #include "util/XMLHelper.h" #include "util/XMLConstants.h" @@ -269,9 +271,9 @@ void XMLHelper::serialize(const DOMNode* n, std::string& buf, bool pretty) XercesJanitor janitor(serializer); if (pretty && serializer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, pretty)) serializer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, pretty); - DOMLSOutput *theOutput = static_cast(impl)->createLSOutput(); - XercesJanitor j_theOutput(theOutput); - theOutput->setEncoding(UTF8); + DOMLSOutput *theOutput = static_cast(impl)->createLSOutput(); + XercesJanitor j_theOutput(theOutput); + theOutput->setEncoding(UTF8); theOutput->setByteStream(&target); if (!serializer->write(n, theOutput)) throw XMLParserException("unable to serialize XML"); @@ -322,9 +324,9 @@ ostream& XMLHelper::serialize(const DOMNode* n, ostream& out, bool pretty) XercesJanitor janitor(serializer); if (pretty && serializer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, pretty)) serializer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, pretty); - DOMLSOutput *theOutput = static_cast(impl)->createLSOutput(); - XercesJanitor j_theOutput(theOutput); - theOutput->setEncoding(UTF8); + DOMLSOutput *theOutput = static_cast(impl)->createLSOutput(); + XercesJanitor j_theOutput(theOutput); + theOutput->setEncoding(UTF8); theOutput->setByteStream(&target); if (!serializer->write(n, theOutput)) throw XMLParserException("unable to serialize XML");