Reducing header overuse, non-inlining selected methods (CPPOST-35).
[shibboleth/cpp-xmltooling.git] / xmltooling / util / XMLHelper.cpp
index 87a165c..9ebde32 100644 (file)
@@ -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<DOMLSSerializer> janitor(serializer);
     if (pretty && serializer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, pretty))
         serializer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, pretty);
-    DOMLSOutput *theOutput = static_cast<DOMImplementationLS*>(impl)->createLSOutput();\r
-    XercesJanitor<DOMLSOutput> j_theOutput(theOutput);\r
-    theOutput->setEncoding(UTF8);\r
+    DOMLSOutput *theOutput = static_cast<DOMImplementationLS*>(impl)->createLSOutput();
+    XercesJanitor<DOMLSOutput> 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<DOMLSSerializer> janitor(serializer);
     if (pretty && serializer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, pretty))
         serializer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, pretty);
-    DOMLSOutput *theOutput = static_cast<DOMImplementationLS*>(impl)->createLSOutput();\r
-    XercesJanitor<DOMLSOutput> j_theOutput(theOutput);\r
-    theOutput->setEncoding(UTF8);\r
+    DOMLSOutput *theOutput = static_cast<DOMImplementationLS*>(impl)->createLSOutput();
+    XercesJanitor<DOMLSOutput> j_theOutput(theOutput);
+    theOutput->setEncoding(UTF8);
     theOutput->setByteStream(&target);
     if (!serializer->write(n, theOutput))
         throw XMLParserException("unable to serialize XML");