summaryrefslogtreecommitdiff
path: root/xsd/examples/cxx/tree/messaging/dom-serialize.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/examples/cxx/tree/messaging/dom-serialize.cxx')
-rw-r--r--xsd/examples/cxx/tree/messaging/dom-serialize.cxx27
1 files changed, 1 insertions, 26 deletions
diff --git a/xsd/examples/cxx/tree/messaging/dom-serialize.cxx b/xsd/examples/cxx/tree/messaging/dom-serialize.cxx
index c0f4311..dbf3370 100644
--- a/xsd/examples/cxx/tree/messaging/dom-serialize.cxx
+++ b/xsd/examples/cxx/tree/messaging/dom-serialize.cxx
@@ -1,5 +1,4 @@
// file : examples/cxx/tree/messaging/dom-serialize.cxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain
#include "dom-serialize.hxx"
@@ -38,8 +37,6 @@ serialize (std::ostream& os,
xml::dom::ostream_format_target oft (os);
-#if _XERCES_VERSION >= 30000
-
// Create a DOMSerializer.
//
xml::dom::auto_ptr<DOMLSSerializer> writer (
@@ -55,6 +52,7 @@ serialize (std::ostream& os,
//
conf->setParameter (XMLUni::fgDOMWRTDiscardDefaultContent, true);
conf->setParameter (XMLUni::fgDOMWRTFormatPrettyPrint, true);
+ conf->setParameter (XMLUni::fgDOMWRTXercesPrettyPrint, false);
xml::dom::auto_ptr<DOMLSOutput> out (impl->createLSOutput ());
out->setEncoding (xml::string (encoding).c_str ());
@@ -62,28 +60,5 @@ serialize (std::ostream& os,
writer->write (&doc, out.get ());
-#else
-
- // Create a DOMWriter.
- //
- xml::dom::auto_ptr<DOMWriter> writer (impl->createDOMWriter ());
-
- // Set error handler.
- //
- writer->setErrorHandler (&ehp);
-
- // Set encoding.
- //
- writer->setEncoding(xml::string (encoding).c_str ());
-
- // Set some generally nice features.
- //
- writer->setFeature (XMLUni::fgDOMWRTDiscardDefaultContent, true);
- writer->setFeature (XMLUni::fgDOMWRTFormatPrettyPrint, true);
-
- writer->writeNode (&oft, doc);
-
-#endif
-
eh.throw_if_failed<tree::serialization<char> > ();
}