blob: 10d2adab9ae4a3627535aa43f42a3b198af2b38b [file] [log] [blame]
<HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>Xerces-C++: DOMWriter Class Reference</TITLE><link href="XercesApi.css" rel="stylesheet" type="text/css"></HEAD><BODY alink="#ff0000" bgcolor="#ffffff" leftmargin="4" link="#0000ff" marginheight="4" marginwidth="4" text="#000000" topmargin="4" vlink="#0000aa"><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" height="60" rowspan="3" valign="top" width="135"><IMG border="0" height="60" hspace="0" src="../resources/logo.gif" vspace="0" width="135"></TD><TD align="left" colspan="4" height="5" valign="top" width="456"><IMG border="0" height="5" hspace="0" src="../resources/line.gif" vspace="0" width="456"></TD><TD align="left" height="60" rowspan="3" valign="top" width="29"><IMG border="0" height="60" hspace="0" src="../resources/right.gif" vspace="0" width="29"></TD></TR><TR><TD align="left" bgcolor="#0086b2" colspan="4" height="35" valign="top" width="456"><IMG alt="" border="0" height="35" hspace="0" src="../graphics/api-header.jpg" vspace="0" width="456"></TD></TR><TR><TD align="left" height="20" valign="top" width="168"><IMG border="0" height="20" hspace="0" src="../resources/bottom.gif" vspace="0" width="168"></TD><TD align="left" height="20" valign="top" width="96"><A href="http://xml.apache.org/" onMouseOut="rolloverOff('xml');" onMouseOver="rolloverOn('xml');" target="new"><IMG alt="http://xml.apache.org/" border="0" height="20" hspace="0" name="xml" onLoad="rolloverLoad('xml','../resources/button-xml-hi.gif','../resources/button-xml-lo.gif');" src="../resources/button-xml-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.apache.org/" onMouseOut="rolloverOff('asf');" onMouseOver="rolloverOn('asf');" target="new"><IMG alt="http://www.apache.org/" border="0" height="20" hspace="0" name="asf" onLoad="rolloverLoad('asf','../resources/button-asf-hi.gif','../resources/button-asf-lo.gif');" src="../resources/button-asf-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.w3.org/" onMouseOut="rolloverOff('w3c');" onMouseOver="rolloverOn('w3c');" target="new"><IMG alt="http://www.w3.org/" border="0" height="20" hspace="0" name="w3c" onLoad="rolloverLoad('w3c','../resources/button-w3c-hi.gif','../resources/button-w3c-lo.gif');" src="../resources/button-w3c-lo.gif" vspace="0" width="96"></A></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" valign="top" width="120"><IMG border="0" height="14" hspace="0" src="../resources/join.gif" vspace="0" width="120"><BR>
<A href="../../index.html" onMouseOut="rolloverOff('side-ext-2');" onMouseOver="rolloverOn('side-ext-2');"><IMG alt="Home" border="0" height="12" hspace="0" name="side-ext-2" onLoad="rolloverLoad('side-ext-2','../graphics/ext-2-label-2.jpg','../graphics/ext-2-label-3.jpg');" src="../graphics/ext-2-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
<A href="../index.html" onMouseOut="rolloverOff('side-index');" onMouseOver="rolloverOn('side-index');"><IMG alt="Readme" border="0" height="12" hspace="0" name="side-index" onLoad="rolloverLoad('side-index','../graphics/index-label-2.jpg','../graphics/index-label-3.jpg');" src="../graphics/index-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="../charter.html" onMouseOut="rolloverOff('side-charter');" onMouseOver="rolloverOn('side-charter');"><IMG alt="Charter" border="0" height="12" hspace="0" name="side-charter" onLoad="rolloverLoad('side-charter','../graphics/charter-label-2.jpg','../graphics/charter-label-3.jpg');" src="../graphics/charter-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="../releases.html" onMouseOut="rolloverOff('side-releases');" onMouseOver="rolloverOn('side-releases');"><IMG alt="Release Info" border="0" height="12" hspace="0" name="side-releases" onLoad="rolloverLoad('side-releases','../graphics/releases-label-2.jpg','../graphics/releases-label-3.jpg');" src="../graphics/releases-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
<A href="../install.html" onMouseOut="rolloverOff('side-install');" onMouseOver="rolloverOn('side-install');"><IMG alt="Installation" border="0" height="12" hspace="0" name="side-install" onLoad="rolloverLoad('side-install','../graphics/install-label-2.jpg','../graphics/install-label-3.jpg');" src="../graphics/install-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="http://xerces.apache.org/xerces-c/download.cgi" onMouseOut="rolloverOff('side-ext-20');" onMouseOver="rolloverOn('side-ext-20');"><IMG alt="Download" border="0" height="12" hspace="0" name="side-ext-20" onLoad="rolloverLoad('side-ext-20','../graphics/ext-20-label-2.jpg','../graphics/ext-20-label-3.jpg');" src="../graphics/ext-20-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="../build.html" onMouseOut="rolloverOff('side-build');" onMouseOver="rolloverOn('side-build');"><IMG alt="Build Instructions" border="0" height="12" hspace="0" name="side-build" onLoad="rolloverLoad('side-build','../graphics/build-label-2.jpg','../graphics/build-label-3.jpg');" src="../graphics/build-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
<A href="../program.html" onMouseOut="rolloverOff('side-program');" onMouseOver="rolloverOn('side-program');"><IMG alt="Programming" border="0" height="12" hspace="0" name="side-program" onLoad="rolloverLoad('side-program','../graphics/program-label-2.jpg','../graphics/program-label-3.jpg');" src="../graphics/program-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="../samples.html" onMouseOut="rolloverOff('side-samples');" onMouseOver="rolloverOn('side-samples');"><IMG alt="Samples" border="0" height="12" hspace="0" name="side-samples" onLoad="rolloverLoad('side-samples','../graphics/samples-label-2.jpg','../graphics/samples-label-3.jpg');" src="../graphics/samples-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="../faqs.html" onMouseOut="rolloverOff('side-faqs');" onMouseOver="rolloverOn('side-faqs');"><IMG alt="FAQs" border="0" height="12" hspace="0" name="side-faqs" onLoad="rolloverLoad('side-faqs','../graphics/faqs-label-2.jpg','../graphics/faqs-label-3.jpg');" src="../graphics/faqs-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
<A href="../api.html" onMouseOut="rolloverOff('side-api');" onMouseOver="rolloverOn('side-api');"><IMG alt="API Docs" border="0" height="12" hspace="0" name="side-api" onLoad="rolloverLoad('side-api','../graphics/api-label-2.jpg','../graphics/api-label-3.jpg');" src="../graphics/api-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="../ApacheDOMC++Binding.html" onMouseOut="rolloverOff('side-ext-88');" onMouseOver="rolloverOn('side-ext-88');"><IMG alt="DOM C++ Binding" border="0" height="12" hspace="0" name="side-ext-88" onLoad="rolloverLoad('side-ext-88','../graphics/ext-88-label-2.jpg','../graphics/ext-88-label-3.jpg');" src="../graphics/ext-88-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="../migrate.html" onMouseOut="rolloverOff('side-migrate');" onMouseOver="rolloverOn('side-migrate');"><IMG alt="Migration Guide" border="0" height="12" hspace="0" name="side-migrate" onLoad="rolloverLoad('side-migrate','../graphics/migrate-label-2.jpg','../graphics/migrate-label-3.jpg');" src="../graphics/migrate-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
<A href="../feedback.html" onMouseOut="rolloverOff('side-feedback');" onMouseOver="rolloverOn('side-feedback');"><IMG alt="Feedback" border="0" height="12" hspace="0" name="side-feedback" onLoad="rolloverLoad('side-feedback','../graphics/feedback-label-2.jpg','../graphics/feedback-label-3.jpg');" src="../graphics/feedback-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="../bug-report.html" onMouseOut="rolloverOff('side-bug-report');" onMouseOver="rolloverOn('side-bug-report');"><IMG alt="Bug-Reporting" border="0" height="12" hspace="0" name="side-bug-report" onLoad="rolloverLoad('side-bug-report','../graphics/bug-report-label-2.jpg','../graphics/bug-report-label-3.jpg');" src="../graphics/bug-report-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="../mailing-lists.html" onMouseOut="rolloverOff('side-mailing-lists');" onMouseOver="rolloverOn('side-mailing-lists');"><IMG alt="Mailing Lists" border="0" height="12" hspace="0" name="side-mailing-lists" onLoad="rolloverLoad('side-mailing-lists','../graphics/mailing-lists-label-2.jpg','../graphics/mailing-lists-label-3.jpg');" src="../graphics/mailing-lists-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
<A href="../source-repository.html" onMouseOut="rolloverOff('side-source-repository');" onMouseOver="rolloverOn('side-source-repository');"><IMG alt="Source Repository" border="0" height="12" hspace="0" name="side-source-repository" onLoad="rolloverLoad('side-source-repository','../graphics/source-repository-label-2.jpg','../graphics/source-repository-label-3.jpg');" src="../graphics/source-repository-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="../applications.html" onMouseOut="rolloverOff('side-applications');" onMouseOver="rolloverOn('side-applications');"><IMG alt="Applications" border="0" height="12" hspace="0" name="side-applications" onLoad="rolloverLoad('side-applications','../graphics/applications-label-2.jpg','../graphics/applications-label-3.jpg');" src="../graphics/applications-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="14" hspace="0" src="../resources/close.gif" vspace="0" width="120"><BR></TD><TD align="left" valign="top" width="500"><TABLE border="0" cellpadding="3" cellspacing="0"><TR><TD>
<TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#FFFFFF" colspan="2" width="494"><TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#039acc" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#039acc" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#039acc" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" width="492"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="2" hspace="0" src="../resources/void.gif" vspace="0" width="2"><B>API Docs for SAX and DOM</B></FONT></TD><TD bgcolor="#017299" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#017299" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#017299" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></TD></TR><TR><TD width="10">&nbsp;</TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif">
<P>
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="classes.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
<h1>DOMWriter Class Reference</h1><!-- doxytag: class="DOMWriter" --><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a> provides an API for serializing (writing) a DOM document out in an XML document.
<a href="#_details">More...</a>
<p>
<p>
<a href="classDOMWriter-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Destructor</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#796d10b88107ccbcaea51d5a5d411dda">~DOMWriter</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <a href="#796d10b88107ccbcaea51d5a5d411dda"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Functions introduced in DOM Level 3</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#4d1ef6889c489c57c92a82e58edd024d">canSetFeature</a> (const XMLCh *const featName, bool state) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Query whether setting a feature to a specific value is supported. <a href="#4d1ef6889c489c57c92a82e58edd024d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#19d6540af17046f233286241f9d99c0d">setFeature</a> (const XMLCh *const featName, bool state)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the state of a feature. <a href="#19d6540af17046f233286241f9d99c0d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#ae92d3e73685802a1ac8d3ccadeacfb0">getFeature</a> (const XMLCh *const featName) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Look up the value of a feature. <a href="#ae92d3e73685802a1ac8d3ccadeacfb0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#a0ddcef5fed6b49e03e53334fedca4b2">setEncoding</a> (const XMLCh *const encoding)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The character encoding in which the output will be written. <a href="#a0ddcef5fed6b49e03e53334fedca4b2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#d3b82a28c1e5875722e5d0e4ff9767ca">setNewLine</a> (const XMLCh *const newLine)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The end-of-line sequence of characters to be used in the XML being written out. <a href="#d3b82a28c1e5875722e5d0e4ff9767ca"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#3b21003420a65892bed8464a28c7e27e">setErrorHandler</a> (<a class="el" href="classDOMErrorHandler.html">DOMErrorHandler</a> *errorHandler)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The error handler that will receive error notifications during serialization. <a href="#3b21003420a65892bed8464a28c7e27e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#eb138df5cfcb1251f128a4198247c05f">setFilter</a> (<a class="el" href="classDOMWriterFilter.html">DOMWriterFilter</a> *filter)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">When the application provides a filter, the serializer will call out to the filter before serializing each Node. <a href="#eb138df5cfcb1251f128a4198247c05f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const XMLCh *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#cdfdf08cff662188d36032abd5aeae07">getEncoding</a> () const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the character encoding in which the output will be written. <a href="#cdfdf08cff662188d36032abd5aeae07"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const XMLCh *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#ec62a22ba85641a2a1ecc9e7cfa0c6ba">getNewLine</a> () const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the end-of-line sequence of characters to be used in the XML being written out. <a href="#ec62a22ba85641a2a1ecc9e7cfa0c6ba"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classDOMErrorHandler.html">DOMErrorHandler</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#822cc241e7946e32f8b76e83f1f2c1b1">getErrorHandler</a> () const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the error handler that will receive error notifications during serialization. <a href="#822cc241e7946e32f8b76e83f1f2c1b1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classDOMWriterFilter.html">DOMWriterFilter</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#ca303ee6bb09571afa7259305f50c557">getFilter</a> () const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the WriterFilter used. <a href="#ca303ee6bb09571afa7259305f50c557"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#06fc41c008b30284736290bbab0a0aa8">writeNode</a> (<a class="el" href="classXMLFormatTarget.html">XMLFormatTarget</a> *const destination, const <a class="el" href="classDOMNode.html">DOMNode</a> &amp;nodeToWrite)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write out the specified node as described above in the description of <code><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a></code>. <a href="#06fc41c008b30284736290bbab0a0aa8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual XMLCh *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#7d900a97ec7e126eebbc5fc791af45a9">writeToString</a> (const <a class="el" href="classDOMNode.html">DOMNode</a> &amp;nodeToWrite)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Serialize the specified node as described above in the description of <code><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a></code>. <a href="#7d900a97ec7e126eebbc5fc791af45a9"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Non-standard Extension</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#ba3fc04fd50fcfb507945edc0d2db06c">release</a> ()=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called to indicate that this Writer is no longer in use and that the implementation may relinquish any resources associated with it. <a href="#ba3fc04fd50fcfb507945edc0d2db06c"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Hidden constructors</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDOMWriter.html#8359a7058d435e5f186adb7f57a06cc9">DOMWriter</a> ()</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a> provides an API for serializing (writing) a DOM document out in an XML document.
<p>
The XML data is written to an output stream, the type of which depends on the specific language bindings in use. During serialization of XML data, namespace fixup is done when possible. <p>
<code><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a></code> accepts any node type for serialization. For nodes of type <code>Document</code> or <code>Entity</code>, well formed XML will be created if possible. The serialized output for these node types is either as a Document or an External Entity, respectively, and is acceptable input for an XML parser. For all other types of nodes the serialized form is not specified, but should be something useful to a human for debugging or diagnostic purposes. Note: rigorously designing an external (source) form for stand-alone node types that don't already have one defined in seems a bit much to take on here. <p>
Within a Document or Entity being serialized, Nodes are processed as follows Documents are written including an XML declaration and a DTD subset, if one exists in the DOM. Writing a document node serializes the entire document. Entity nodes, when written directly by <code>writeNode</code> defined in the <code><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a></code> interface, output the entity expansion but no namespace fixup is done. The resulting output will be valid as an external entity. Entity References nodes are serializes as an entity reference of the form <code>"&amp;amp;entityName;"</code>) in the output. Child nodes (the expansion) of the entity reference are ignored. CDATA sections containing content characters that can not be represented in the specified output encoding are handled according to the "split-cdata-sections" feature.If the feature is <code>true</code>, CDATA sections are split, and the unrepresentable characters are serialized as numeric character references in ordinary content. The exact position and number of splits is not specified. If the feature is <code>false</code>, unrepresentable characters in a CDATA section are reported as errors. The error is not recoverable - there is no mechanism for supplying alternative characters and continuing with the serialization. All other node types (<a class="el" href="classDOMElement.html" title="By far the vast majority of objects (apart from text) that authors encounter when...">DOMElement</a>, <a class="el" href="classDOMText.html" title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a>, etc.) are serialized to their corresponding XML source form. <p>
Within the character data of a document (outside of markup), any characters that cannot be represented directly are replaced with character references. Occurrences of '&lt;' and '&amp;' are replaced by the predefined entities &amp;lt; and &amp;amp. The other predefined entities (&amp;gt, &amp;apos, etc.) are not used; these characters can be included directly. Any character that can not be represented directly in the output character encoding is serialized as a numeric character reference. <p>
<a class="el" href="classAttributes.html" title="Interface for an element&#39;s attribute specifications.">Attributes</a> not containing quotes are serialized in quotes. <a class="el" href="classAttributes.html" title="Interface for an element&#39;s attribute specifications.">Attributes</a> containing quotes but no apostrophes are serialized in apostrophes (single quotes). <a class="el" href="classAttributes.html" title="Interface for an element&#39;s attribute specifications.">Attributes</a> containing both forms of quotes are serialized in quotes, with quotes within the value represented by the predefined entity &amp;quot;. Any character that can not be represented directly in the output character encoding is serialized as a numeric character reference. <p>
Within markup, but outside of attributes, any occurrence of a character that cannot be represented in the output character encoding is reported as an error. An example would be serializing the element &lt;LaCa�ada/&gt; with the encoding="us-ascii". <p>
When requested by setting the <code>normalize-characters</code> feature on <code><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a></code>, all data to be serialized, both markup and character data, is W3C Text normalized according to the rules defined in . The W3C Text normalization process affects only the data as it is being written; it does not alter the DOM's view of the document after serialization has completed. <p>
Namespaces are fixed up during serialization, the serialization process will verify that namespace declarations, namespace prefixes and the namespace URIs associated with Elements and <a class="el" href="classAttributes.html" title="Interface for an element&#39;s attribute specifications.">Attributes</a> are consistent. If inconsistencies are found, the serialized form of the document will be altered to remove them. The algorithm used for doing the namespace fixup while seralizing a document is a combination of the algorithms used for lookupNamespaceURI and lookupNamespacePrefix . previous paragraph to be defined closer here. <p>
Any changes made affect only the namespace prefixes and declarations appearing in the serialized data. The DOM's view of the document is not altered by the serialization operation, and does not reflect any changes made to namespace declarations or prefixes in the serialized output. <p>
While serializing a document the serializer will write out non-specified values (such as attributes whose <code>specified</code> is <code>false</code>) if the <code>output-default-values</code> feature is set to <code>true</code>. If the <code>output-default-values</code> flag is set to <code>false</code> and the <code>use-abstract-schema</code> feature is set to <code>true</code> the abstract schema will be used to determine if a value is specified or not, if <code>use-abstract-schema</code> is not set the <code>specified</code> flag on attribute nodes is used to determine if attribute values should be written out. <p>
Ref to Core spec (1.1.9, XML namespaces, 5th paragraph) entity ref description about warning about unbound entity refs. Entity refs are always serialized as &amp;foo;, also mention this in the load part of this spec. <p>
When serializing a document the <a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a> checks to see if the document element in the document is a DOM Level 1 element or a DOM Level 2 (or higher) element (this check is done by looking at the localName of the root element). If the root element is a DOM Level 1 element then the <a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a> will issue an error if a DOM Level 2 (or higher) element is found while serializing. Likewise if the document element is a DOM Level 2 (or higher) element and the <a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a> sees a DOM Level 1 element an error is issued. Mixing DOM Level 1 elements with DOM Level 2 (or higher) is not supported. <p>
<code><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a></code>s have a number of named features that can be queried or set. The name of <code><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a></code> features must be valid XML names. Implementation specific features (extensions) should choose an implementation dependent prefix to avoid name collisions. <p>
Here is a list of properties that must be recognized by all implementations. <dl>
<dt><code>"normalize-characters"</code> </dt>
<dd><dl>
<dt><code>true</code> </dt>
<dd>[ optional] (default) Perform the W3C Text Normalization of the characters in document as they are written out. Only the characters being written are (potentially) altered. The DOM document itself is unchanged. </dd>
<dt><code>false</code> </dt>
<dd>[required] do not perform character normalization. </dd>
</dl>
</dd>
<dt><code>"split-cdata-sections"</code> </dt>
<dd><dl>
<dt><code>true</code> </dt>
<dd>[required] (default) Split CDATA sections containing the CDATA section termination marker ']]&gt;' or characters that can not be represented in the output encoding, and output the characters using numeric character references. If a CDATA section is split a warning is issued. </dd>
<dt><code>false</code> </dt>
<dd>[ required] Signal an error if a <code>CDATASection</code> contains an unrepresentable character. </dd>
</dl>
</dd>
<dt><code>"validation"</code> </dt>
<dd><dl>
<dt><code>true</code> </dt>
<dd>[ optional] Use the abstract schema to validate the document as it is being serialized. If validation errors are found the error handler is notified about the error. Setting this state will also set the feature <code>use-abstract-schema</code> to <code>true</code>. </dd>
<dt><code>false</code> </dt>
<dd>[ required] (default) Don't validate the document as it is being serialized. </dd>
</dl>
</dd>
<dt><code>"expand-entity-references"</code> </dt>
<dd><dl>
<dt><code>true</code> </dt>
<dd>[ optional] Expand <code>EntityReference</code> nodes when serializing. </dd>
<dt><code>false</code> </dt>
<dd>[required] (default) Serialize all <code>EntityReference</code> nodes as XML entity references. </dd>
</dl>
</dd>
<dt><code>"whitespace-in-element-content"</code> </dt>
<dd><dl>
<dt><code>true</code> </dt>
<dd>[required] ( default) Output all white spaces in the document. </dd>
<dt><code>false</code> </dt>
<dd>[ optional] Only output white space that is not within element content. The implementation is expected to use the <code>isWhitespaceInElementContent</code> flag on <code>Text</code> nodes to determine if a text node should be written out or not. </dd>
</dl>
</dd>
<dt><code>"discard-default-content"</code> </dt>
<dd><dl>
<dt><code>true</code> </dt>
<dd>[required] (default ) Use whatever information available to the implementation (i.e. XML schema, DTD, the <code>specified</code> flag on <code>Attr</code> nodes, and so on) to decide what attributes and content should be serialized or not. Note that the <code>specified</code> flag on <code>Attr</code> nodes in itself is not always reliable, it is only reliable when it is set to <code>false</code> since the only case where it can be set to <code>false</code> is if the attribute was created by a Level 1 implementation. </dd>
<dt><code>false</code> </dt>
<dd>[required] Output all attributes and all content. </dd>
</dl>
</dd>
<dt><code>"format-canonical"</code> </dt>
<dd><dl>
<dt><code>true</code> </dt>
<dd>[optional] This formatting writes the document according to the rules specified in . Setting this feature to true will set the feature "format-pretty-print" to false. </dd>
<dt><code>false</code> </dt>
<dd>[required] (default) Don't canonicalize the output. </dd>
</dl>
</dd>
<dt><code>"format-pretty-print"</code> </dt>
<dd><dl>
<dt><code>true</code> </dt>
<dd>[optional] Formatting the output by adding whitespace to produce a pretty-printed, indented, human-readable form. The exact form of the transformations is not specified by this specification. Setting this feature to true will set the feature "format-canonical" to false. </dd>
<dt><code>false</code> </dt>
<dd>[required] (default) Don't pretty-print the result. </dd>
</dl>
</dd>
</dl>
<p>
See also the <a href="http://www.w3.org/TR/2002/WD-DOM-Level-3-ASLS-20020409">Document Object Model (DOM) Level 3 Abstract Schemas and Load and Save Specification</a>.<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="8359a7058d435e5f186adb7f57a06cc9"></a><!-- doxytag: member="DOMWriter::DOMWriter" ref="8359a7058d435e5f186adb7f57a06cc9" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DOMWriter::DOMWriter </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="796d10b88107ccbcaea51d5a5d411dda"></a><!-- doxytag: member="DOMWriter::~DOMWriter" ref="796d10b88107ccbcaea51d5a5d411dda" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual DOMWriter::~DOMWriter </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Destructor.
<p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="4d1ef6889c489c57c92a82e58edd024d"></a><!-- doxytag: member="DOMWriter::canSetFeature" ref="4d1ef6889c489c57c92a82e58edd024d" args="(const XMLCh *const featName, bool state) const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool DOMWriter::canSetFeature </td>
<td>(</td>
<td class="paramtype">const XMLCh *const &nbsp;</td>
<td class="paramname"> <em>featName</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&nbsp;</td>
<td class="paramname"> <em>state</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Query whether setting a feature to a specific value is supported.
<p>
<br>
The feature name has the same form as a DOM hasFeature string.<p>
<b>"Experimental - subject to change"</b><p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>featName</em>&nbsp;</td><td>The feature name, which is a DOM has-feature style string. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>state</em>&nbsp;</td><td>The requested state of the feature (<code>true</code> or <code>false</code>). </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> if the feature could be successfully set to the specified value, or <code>false</code> if the feature is not recognized or the requested value is not supported. The value of the feature itself is not changed. </dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="19d6540af17046f233286241f9d99c0d"></a><!-- doxytag: member="DOMWriter::setFeature" ref="19d6540af17046f233286241f9d99c0d" args="(const XMLCh *const featName, bool state)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void DOMWriter::setFeature </td>
<td>(</td>
<td class="paramtype">const XMLCh *const &nbsp;</td>
<td class="paramname"> <em>featName</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&nbsp;</td>
<td class="paramname"> <em>state</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the state of a feature.
<p>
<br>
The feature name has the same form as a DOM hasFeature string. <br>
It is possible for a <code><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a></code> to recognize a feature name but to be unable to set its value.<p>
<b>"Experimental - subject to change"</b><p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>featName</em>&nbsp;</td><td>The feature name. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>state</em>&nbsp;</td><td>The requested state of the feature (<code>true</code> or <code>false</code>). </td></tr>
</table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classDOMException.html">DOMException</a></em>&nbsp;</td><td>Raise a NOT_SUPPORTED_ERR exception when the <code><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a></code> recognizes the feature name but cannot set the requested value. <br>
Raise a NOT_FOUND_ERR When the <code><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a></code> does not recognize the feature name. </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classDOMWriter.html#ae92d3e73685802a1ac8d3ccadeacfb0" title="Look up the value of a feature.">getFeature</a> </dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="ae92d3e73685802a1ac8d3ccadeacfb0"></a><!-- doxytag: member="DOMWriter::getFeature" ref="ae92d3e73685802a1ac8d3ccadeacfb0" args="(const XMLCh *const featName) const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool DOMWriter::getFeature </td>
<td>(</td>
<td class="paramtype">const XMLCh *const &nbsp;</td>
<td class="paramname"> <em>featName</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Look up the value of a feature.
<p>
<br>
The feature name has the same form as a DOM hasFeature string <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>featName</em>&nbsp;</td><td>The feature name, which is a string with DOM has-feature syntax. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The current state of the feature (<code>true</code> or <code>false</code>). </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classDOMException.html">DOMException</a></em>&nbsp;</td><td>Raise a NOT_FOUND_ERR When the <code><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a></code> does not recognize the feature name.</td></tr>
</table>
</dl>
<p>
<b>"Experimental - subject to change"</b><p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classDOMWriter.html#19d6540af17046f233286241f9d99c0d" title="Set the state of a feature.">setFeature</a> </dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="a0ddcef5fed6b49e03e53334fedca4b2"></a><!-- doxytag: member="DOMWriter::setEncoding" ref="a0ddcef5fed6b49e03e53334fedca4b2" args="(const XMLCh *const encoding)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void DOMWriter::setEncoding </td>
<td>(</td>
<td class="paramtype">const XMLCh *const &nbsp;</td>
<td class="paramname"> <em>encoding</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The character encoding in which the output will be written.
<p>
<br>
The encoding to use when writing is determined as follows: If the encoding attribute has been set, that value will be used.If the encoding attribute is <code>null</code> or empty, but the item to be written includes an encoding declaration, that value will be used.If neither of the above provides an encoding name, a default encoding of "UTF-8" will be used. <br>
The default value is <code>null</code>.<p>
<b>"Experimental - subject to change"</b><p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>encoding</em>&nbsp;</td><td>The character encoding in which the output will be written. </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classDOMWriter.html#cdfdf08cff662188d36032abd5aeae07" title="Return the character encoding in which the output will be written.">getEncoding</a> </dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="d3b82a28c1e5875722e5d0e4ff9767ca"></a><!-- doxytag: member="DOMWriter::setNewLine" ref="d3b82a28c1e5875722e5d0e4ff9767ca" args="(const XMLCh *const newLine)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void DOMWriter::setNewLine </td>
<td>(</td>
<td class="paramtype">const XMLCh *const &nbsp;</td>
<td class="paramname"> <em>newLine</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The end-of-line sequence of characters to be used in the XML being written out.
<p>
The only permitted values are these: <dl>
<dt><code>null</code> </dt>
<dd>Use a default end-of-line sequence. DOM implementations should choose the default to match the usual convention for text files in the environment being used. Implementations must choose a default sequence that matches one of those allowed by 2.11 "End-of-Line Handling". </dd>
<dt>CR </dt>
<dd>The carriage-return character (xD). </dd>
<dt>CR-LF </dt>
<dd>The carriage-return and line-feed characters (xD xA). </dd>
<dt>LF </dt>
<dd>The line-feed character (xA). </dd>
</dl>
<br>
The default value for this attribute is <code>null</code>.<p>
<b>"Experimental - subject to change"</b><p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>newLine</em>&nbsp;</td><td>The end-of-line sequence of characters to be used. </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classDOMWriter.html#ec62a22ba85641a2a1ecc9e7cfa0c6ba" title="Return the end-of-line sequence of characters to be used in the XML being written...">getNewLine</a> </dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="3b21003420a65892bed8464a28c7e27e"></a><!-- doxytag: member="DOMWriter::setErrorHandler" ref="3b21003420a65892bed8464a28c7e27e" args="(DOMErrorHandler *errorHandler)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void DOMWriter::setErrorHandler </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classDOMErrorHandler.html">DOMErrorHandler</a> *&nbsp;</td>
<td class="paramname"> <em>errorHandler</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The error handler that will receive error notifications during serialization.
<p>
The node where the error occured is passed to this error handler, any modification to nodes from within an error callback should be avoided since this will result in undefined, implementation dependent behavior.<p>
<b>"Experimental - subject to change"</b><p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>errorHandler</em>&nbsp;</td><td>The error handler to be used. </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classDOMWriter.html#822cc241e7946e32f8b76e83f1f2c1b1" title="Return the error handler that will receive error notifications during serialization...">getErrorHandler</a> </dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="eb138df5cfcb1251f128a4198247c05f"></a><!-- doxytag: member="DOMWriter::setFilter" ref="eb138df5cfcb1251f128a4198247c05f" args="(DOMWriterFilter *filter)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void DOMWriter::setFilter </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classDOMWriterFilter.html">DOMWriterFilter</a> *&nbsp;</td>
<td class="paramname"> <em>filter</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
When the application provides a filter, the serializer will call out to the filter before serializing each Node.
<p>
Attribute nodes are never passed to the filter. The filter implementation can choose to remove the node from the stream or to terminate the serialization early.<p>
<b>"Experimental - subject to change"</b><p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>filter</em>&nbsp;</td><td>The writer filter to be used. </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classDOMWriter.html#ca303ee6bb09571afa7259305f50c557" title="Return the WriterFilter used.">getFilter</a> </dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="cdfdf08cff662188d36032abd5aeae07"></a><!-- doxytag: member="DOMWriter::getEncoding" ref="cdfdf08cff662188d36032abd5aeae07" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual const XMLCh* DOMWriter::getEncoding </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return the character encoding in which the output will be written.
<p>
<b>"Experimental - subject to change"</b><p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The character encoding used. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classDOMWriter.html#a0ddcef5fed6b49e03e53334fedca4b2" title="The character encoding in which the output will be written.">setEncoding</a> </dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="ec62a22ba85641a2a1ecc9e7cfa0c6ba"></a><!-- doxytag: member="DOMWriter::getNewLine" ref="ec62a22ba85641a2a1ecc9e7cfa0c6ba" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual const XMLCh* DOMWriter::getNewLine </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return the end-of-line sequence of characters to be used in the XML being written out.
<p>
<b>"Experimental - subject to change"</b><p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The end-of-line sequence of characters to be used. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classDOMWriter.html#d3b82a28c1e5875722e5d0e4ff9767ca" title="The end-of-line sequence of characters to be used in the XML being written out.">setNewLine</a> </dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="822cc241e7946e32f8b76e83f1f2c1b1"></a><!-- doxytag: member="DOMWriter::getErrorHandler" ref="822cc241e7946e32f8b76e83f1f2c1b1" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classDOMErrorHandler.html">DOMErrorHandler</a>* DOMWriter::getErrorHandler </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return the error handler that will receive error notifications during serialization.
<p>
<b>"Experimental - subject to change"</b><p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The error handler to be used. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classDOMWriter.html#3b21003420a65892bed8464a28c7e27e" title="The error handler that will receive error notifications during serialization.">setErrorHandler</a> </dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="ca303ee6bb09571afa7259305f50c557"></a><!-- doxytag: member="DOMWriter::getFilter" ref="ca303ee6bb09571afa7259305f50c557" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classDOMWriterFilter.html">DOMWriterFilter</a>* DOMWriter::getFilter </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return the WriterFilter used.
<p>
<b>"Experimental - subject to change"</b><p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The writer filter used. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classDOMWriter.html#eb138df5cfcb1251f128a4198247c05f" title="When the application provides a filter, the serializer will call out to the filter...">setFilter</a> </dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="06fc41c008b30284736290bbab0a0aa8"></a><!-- doxytag: member="DOMWriter::writeNode" ref="06fc41c008b30284736290bbab0a0aa8" args="(XMLFormatTarget *const destination, const DOMNode &amp;nodeToWrite)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool DOMWriter::writeNode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classXMLFormatTarget.html">XMLFormatTarget</a> *const &nbsp;</td>
<td class="paramname"> <em>destination</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classDOMNode.html">DOMNode</a> &amp;&nbsp;</td>
<td class="paramname"> <em>nodeToWrite</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Write out the specified node as described above in the description of <code><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a></code>.
<p>
Writing a Document or Entity node produces a serialized form that is well formed XML. Writing other node types produces a fragment of text in a form that is not fully defined by this document, but that should be useful to a human for debugging or diagnostic purposes.<p>
<b>"Experimental - subject to change"</b><p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>destination</em>&nbsp;</td><td>The destination for the data to be written. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>nodeToWrite</em>&nbsp;</td><td>The <code>Document</code> or <code>Entity</code> node to be written. For other node types, something sensible should be written, but the exact serialized form is not specified. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Returns <code>true</code> if <code>node</code> was successfully serialized and <code>false</code> in case a failure occured and the failure wasn't canceled by the error handler. </dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="7d900a97ec7e126eebbc5fc791af45a9"></a><!-- doxytag: member="DOMWriter::writeToString" ref="7d900a97ec7e126eebbc5fc791af45a9" args="(const DOMNode &amp;nodeToWrite)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual XMLCh* DOMWriter::writeToString </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classDOMNode.html">DOMNode</a> &amp;&nbsp;</td>
<td class="paramname"> <em>nodeToWrite</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Serialize the specified node as described above in the description of <code><a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a></code>.
<p>
The result of serializing the node is returned as a string. Writing a Document or Entity node produces a serialized form that is well formed XML. Writing other node types produces a fragment of text in a form that is not fully defined by this document, but that should be useful to a human for debugging or diagnostic purposes.<p>
<b>"Experimental - subject to change"</b><p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>nodeToWrite</em>&nbsp;</td><td>The node to be written. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Returns the serialized data, or <code>null</code> in case a failure occured and the failure wasn't canceled by the error handler. The returned string is always in UTF-16. The encoding information available in <a class="el" href="classDOMWriter.html" title="DOMWriter provides an API for serializing (writing) a DOM document out in an XML...">DOMWriter</a> is ignored in <a class="el" href="classDOMWriter.html#7d900a97ec7e126eebbc5fc791af45a9" title="Serialize the specified node as described above in the description of DOMWriter.">writeToString()</a>. </dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
</div>
</div><p>
<a class="anchor" name="ba3fc04fd50fcfb507945edc0d2db06c"></a><!-- doxytag: member="DOMWriter::release" ref="ba3fc04fd50fcfb507945edc0d2db06c" args="()=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void DOMWriter::release </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Called to indicate that this Writer is no longer in use and that the implementation may relinquish any resources associated with it.
<p>
Access to a released object will lead to unexpected result.
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="DOMWriter_8hpp-source.html">DOMWriter.hpp</a></ul>
</FONT></TD></TR></TABLE><BR>
</TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD bgcolor="#0086b2"><IMG height="1" src="images/dot.gif" width="1" alt=""></TD></TR><TR><TD align="center"><FONT color="#0086b2" size="-1"><I>
Copyright &copy; 1994-2004 The Apache Software Foundation.
All Rights Reserved.
</I></FONT></TD></TR></TABLE></BODY></HTML>