Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:51

0001 /*
0002  * Licensed to the Apache Software Foundation (ASF) under one or more
0003  * contributor license agreements.  See the NOTICE file distributed with
0004  * this work for additional information regarding copyright ownership.
0005  * The ASF licenses this file to You under the Apache License, Version 2.0
0006  * (the "License"); you may not use this file except in compliance with
0007  * the License.  You may obtain a copy of the License at
0008  *
0009  *      http://www.apache.org/licenses/LICENSE-2.0
0010  *
0011  * Unless required by applicable law or agreed to in writing, software
0012  * distributed under the License is distributed on an "AS IS" BASIS,
0013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014  * See the License for the specific language governing permissions and
0015  * limitations under the License.
0016  */
0017 
0018 /*
0019  * $Id$
0020  */
0021 
0022 #if !defined(XERCESC_INCLUDE_GUARD_DOMLSSERIALIZER_HPP)
0023 #define XERCESC_INCLUDE_GUARD_DOMLSSERIALIZER_HPP
0024 
0025 /**
0026  *
0027  * DOMLSSerializer provides an API for serializing (writing) a DOM document out in
0028  * an XML document. The XML data is written to an output stream, the type of
0029  * which depends on the specific language bindings in use. During
0030  * serialization of XML data, namespace fixup is done when possible.
0031  * <p> <code>DOMLSSerializer</code> accepts any node type for serialization. For
0032  * nodes of type <code>Document</code> or <code>Entity</code>, well formed
0033  * XML will be created if possible. The serialized output for these node
0034  * types is either as a Document or an External Entity, respectively, and is
0035  * acceptable input for an XML parser. For all other types of nodes the
0036  * serialized form is not specified, but should be something useful to a
0037  * human for debugging or diagnostic purposes. Note: rigorously designing an
0038  * external (source) form for stand-alone node types that don't already have
0039  * one defined in  seems a bit much to take on here.
0040  * <p>Within a Document or Entity being serialized, Nodes are processed as
0041  * follows Documents are written including an XML declaration and a DTD
0042  * subset, if one exists in the DOM. Writing a document node serializes the
0043  * entire document.  Entity nodes, when written directly by
0044  * <code>write</code> defined in the <code>DOMLSSerializer</code> interface,
0045  * output the entity expansion but no namespace fixup is done. The resulting
0046  * output will be valid as an external entity.  Entity References nodes are
0047  * serializes as an entity reference of the form
0048  * <code>"&amp;entityName;"</code>) in the output. Child nodes (the
0049  * expansion) of the entity reference are ignored.  CDATA sections
0050  * containing content characters that can not be represented in the
0051  * specified output encoding are handled according to the
0052  * "split-cdata-sections" feature.If the feature is <code>true</code>, CDATA
0053  * sections are split, and the unrepresentable characters are serialized as
0054  * numeric character references in ordinary content. The exact position and
0055  * number of splits is not specified. If the feature is <code>false</code>,
0056  * unrepresentable characters in a CDATA section are reported as errors. The
0057  * error is not recoverable - there is no mechanism for supplying
0058  * alternative characters and continuing with the serialization. All other
0059  * node types (DOMElement, DOMText, etc.) are serialized to their corresponding
0060  * XML source form.
0061  * <p> Within the character data of a document (outside of markup), any
0062  * characters that cannot be represented directly are replaced with
0063  * character references. Occurrences of '&lt;' and '&amp;' are replaced by
0064  * the predefined entities &amp;lt; and &amp;amp. The other predefined
0065  * entities (&amp;gt, &amp;apos, etc.) are not used; these characters can be
0066  * included directly. Any character that can not be represented directly in
0067  * the output character encoding is serialized as a numeric character
0068  * reference.
0069  * <p> Attributes not containing quotes are serialized in quotes. Attributes
0070  * containing quotes but no apostrophes are serialized in apostrophes
0071  * (single quotes). Attributes containing both forms of quotes are
0072  * serialized in quotes, with quotes within the value represented by the
0073  * predefined entity &amp;quot;. Any character that can not be represented
0074  * directly in the output character encoding is serialized as a numeric
0075  * character reference.
0076  * <p> Within markup, but outside of attributes, any occurrence of a character
0077  * that cannot be represented in the output character encoding is reported
0078  * as an error. An example would be serializing the element
0079  * &lt;LaCa&#xF1;ada/&gt; with the encoding="us-ascii".
0080  * <p> When requested by setting the <code>normalize-characters</code> feature
0081  * on <code>DOMLSSerializer</code>, all data to be serialized, both markup and
0082  * character data, is W3C Text normalized according to the rules defined in
0083  * . The W3C Text normalization process affects only the data as it is being
0084  * written; it does not alter the DOM's view of the document after
0085  * serialization has completed.
0086  * <p>Namespaces are fixed up during serialization, the serialization process
0087  * will verify that namespace declarations, namespace prefixes and the
0088  * namespace URIs associated with Elements and Attributes are consistent. If
0089  * inconsistencies are found, the serialized form of the document will be
0090  * altered to remove them. The algorithm used for doing the namespace fixup
0091  * while seralizing a document is a combination of the algorithms used for
0092  * lookupNamespaceURI and lookupPrefix. previous paragraph to be
0093  * defined closer here.
0094  * <p>Any changes made affect only the namespace prefixes and declarations
0095  * appearing in the serialized data. The DOM's view of the document is not
0096  * altered by the serialization operation, and does not reflect any changes
0097  * made to namespace declarations or prefixes in the serialized output.
0098  * <p> While serializing a document the serializer will write out
0099  * non-specified values (such as attributes whose <code>specified</code> is
0100  * <code>false</code>) if the <code>output-default-values</code> feature is
0101  * set to <code>true</code>. If the <code>output-default-values</code> flag
0102  * is set to <code>false</code> and the <code>use-abstract-schema</code>
0103  * feature is set to <code>true</code> the abstract schema will be used to
0104  * determine if a value is specified or not, if
0105  * <code>use-abstract-schema</code> is not set the <code>specified</code>
0106  * flag on attribute nodes is used to determine if attribute values should
0107  * be written out.
0108  * <p> Ref to Core spec (1.1.9, XML namespaces, 5th paragraph) entity ref
0109  * description about warning about unbound entity refs. Entity refs are
0110  * always serialized as &amp;foo;, also mention this in the load part of
0111  * this spec.
0112  * <p> When serializing a document the DOMLSSerializer checks to see if the document
0113  * element in the document is a DOM Level 1 element or a DOM Level 2 (or
0114  * higher) element (this check is done by looking at the localName of the
0115  * root element). If the root element is a DOM Level 1 element then the
0116  * DOMLSSerializer will issue an error if a DOM Level 2 (or higher) element is
0117  * found while serializing. Likewise if the document element is a DOM Level
0118  * 2 (or higher) element and the DOMLSSerializer sees a DOM Level 1 element an
0119  * error is issued. Mixing DOM Level 1 elements with DOM Level 2 (or higher)
0120  * is not supported.
0121  * <p> <code>DOMLSSerializer</code>s have a number of named features that can be
0122  * queried or set. The name of <code>DOMLSSerializer</code> features must be valid
0123  * XML names. Implementation specific features (extensions) should choose an
0124  * implementation dependent prefix to avoid name collisions.
0125  * <p>Here is a list of properties that must be recognized by all
0126  * implementations.
0127  * <dl>
0128  * <dt><code>"normalize-characters"</code></dt>
0129  * <dd>
0130  * <dl>
0131  * <dt><code>true</code></dt>
0132  * <dd>[
0133  * optional] (default) Perform the W3C Text Normalization of the characters
0134  * in document as they are written out. Only the characters being written
0135  * are (potentially) altered. The DOM document itself is unchanged. </dd>
0136  * <dt>
0137  * <code>false</code></dt>
0138  * <dd>[required] do not perform character normalization. </dd>
0139  * </dl></dd>
0140  * <dt>
0141  * <code>"split-cdata-sections"</code></dt>
0142  * <dd>
0143  * <dl>
0144  * <dt><code>true</code></dt>
0145  * <dd>[required] (default)
0146  * Split CDATA sections containing the CDATA section termination marker
0147  * ']]&gt;' or characters that can not be represented in the output
0148  * encoding, and output the characters using numeric character references.
0149  * If a CDATA section is split a warning is issued. </dd>
0150  * <dt><code>false</code></dt>
0151  * <dd>[
0152  * required] Signal an error if a <code>CDATASection</code> contains an
0153  * unrepresentable character. </dd>
0154  * </dl></dd>
0155  * <dt><code>"validation"</code></dt>
0156  * <dd>
0157  * <dl>
0158  * <dt><code>true</code></dt>
0159  * <dd>[
0160  * optional] Use the abstract schema to validate the document as it is being
0161  * serialized. If validation errors are found the error handler is notified
0162  * about the error. Setting this state will also set the feature
0163  * <code>use-abstract-schema</code> to <code>true</code>. </dd>
0164  * <dt><code>false</code></dt>
0165  * <dd>[
0166  * required] (default) Don't validate the document as it is being
0167  * serialized. </dd>
0168  * </dl></dd>
0169  * <dt><code>"expand-entity-references"</code></dt>
0170  * <dd>
0171  * <dl>
0172  * <dt><code>true</code></dt>
0173  * <dd>[
0174  * optional] Expand <code>EntityReference</code> nodes when serializing. </dd>
0175  * <dt>
0176  * <code>false</code></dt>
0177  * <dd>[required] (default) Serialize all
0178  * <code>EntityReference</code> nodes as XML entity references. </dd>
0179  * </dl></dd>
0180  * <dt>
0181  * <code>"whitespace-in-element-content"</code></dt>
0182  * <dd>
0183  * <dl>
0184  * <dt><code>true</code></dt>
0185  * <dd>[required] (
0186  * default) Output all white spaces in the document. </dd>
0187  * <dt><code>false</code></dt>
0188  * <dd>[
0189  * optional] Only output white space that is not within element content. The
0190  * implementation is expected to use the
0191  * <code>isWhitespaceInElementContent</code> flag on <code>Text</code> nodes
0192  * to determine if a text node should be written out or not. </dd>
0193  * </dl></dd>
0194  * <dt>
0195  * <code>"discard-default-content"</code></dt>
0196  * <dd>
0197  * <dl>
0198  * <dt><code>true</code></dt>
0199  * <dd>[required] (default
0200  * ) Use whatever information available to the implementation (i.e. XML
0201  * schema, DTD, the <code>specified</code> flag on <code>Attr</code> nodes,
0202  * and so on) to decide what attributes and content should be serialized or
0203  * not. Note that the <code>specified</code> flag on <code>Attr</code> nodes
0204  * in itself is not always reliable, it is only reliable when it is set to
0205  * <code>false</code> since the only case where it can be set to
0206  * <code>false</code> is if the attribute was created by a Level 1
0207  * implementation. </dd>
0208  * <dt><code>false</code></dt>
0209  * <dd>[required] Output all attributes and
0210  * all content. </dd>
0211  * </dl></dd>
0212  * <dt><code>"format-canonical"</code></dt>
0213  * <dd>
0214  * <dl>
0215  * <dt><code>true</code></dt>
0216  * <dd>[optional]
0217  * This formatting writes the document according to the rules specified in .
0218  * Setting this feature to true will set the feature "format-pretty-print"
0219  * to false. </dd>
0220  * <dt><code>false</code></dt>
0221  * <dd>[required] (default) Don't canonicalize the
0222  * output. </dd>
0223  * </dl></dd>
0224  * <dt><code>"format-pretty-print"</code></dt>
0225  * <dd>
0226  * <dl>
0227  * <dt><code>true</code></dt>
0228  * <dd>[optional]
0229  * Formatting the output by adding whitespace to produce a pretty-printed,
0230  * indented, human-readable form. The exact form of the transformations is
0231  * not specified by this specification. Setting this feature to true will
0232  * set the feature "format-canonical" to false. </dd>
0233  * <dt><code>false</code></dt>
0234  * <dd>[required]
0235  * (default) Don't pretty-print the result. </dd>
0236  * </dl></dd>
0237  * <dt><code>"http://apache.org/xml/features/dom/byte-order-mark"</code></dt>
0238  * <dd>
0239  * <dl>
0240  * <dt><code>false</code></dt>
0241  * <dd>[optional]
0242  * (default) Setting this feature to true will output the correct BOM for the specified
0243  * encoding. </dd>
0244  * <dt><code>true</code></dt>
0245  * <dd>[required]
0246  * Don't generate a BOM. </dd>
0247  * </dl></dd>
0248  * <dt><code>"http://apache.org/xml/features/pretty-print/space-first-level-elements"</code></dt>
0249  * <dd>
0250  * <dl>
0251  * <dt><code>true</code></dt>
0252  * <dd>[optional]
0253  * (default) Setting this feature to true will add an extra line feed between the elements
0254  * that are children of the document root. </dd>
0255  * <dt><code>false</code></dt>
0256  * <dd>[required]
0257  * Don't add the extra line feed. </dd>
0258  * </dl></dd>
0259  * </dl>
0260  * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load and Save Specification</a>.
0261  *
0262  * @since DOM Level 3
0263  */
0264 
0265 
0266 #include <xercesc/dom/DOMNode.hpp>
0267 #include <xercesc/dom/DOMLSSerializerFilter.hpp>
0268 #include <xercesc/dom/DOMErrorHandler.hpp>
0269 #include <xercesc/dom/DOMConfiguration.hpp>
0270 
0271 XERCES_CPP_NAMESPACE_BEGIN
0272 
0273 class DOMLSOutput;
0274 
0275 class CDOM_EXPORT DOMLSSerializer
0276 {
0277 protected :
0278     // -----------------------------------------------------------------------
0279     //  Hidden constructors
0280     // -----------------------------------------------------------------------
0281     /** @name Hidden constructors */
0282     //@{
0283     DOMLSSerializer() {};
0284     //@}
0285 private:
0286     // -----------------------------------------------------------------------
0287     // Unimplemented constructors and operators
0288     // -----------------------------------------------------------------------
0289     /** @name Unimplemented constructors and operators */
0290     //@{
0291     DOMLSSerializer(const DOMLSSerializer &);
0292     DOMLSSerializer & operator = (const DOMLSSerializer &);
0293     //@}
0294 
0295 
0296 public:
0297     // -----------------------------------------------------------------------
0298     //  All constructors are hidden, just the destructor is available
0299     // -----------------------------------------------------------------------
0300     /** @name Destructor */
0301     //@{
0302     /**
0303      * Destructor
0304      *
0305      */
0306     virtual ~DOMLSSerializer() {};
0307     //@}
0308 
0309     // -----------------------------------------------------------------------
0310     //  Virtual DOMLSSerializer interface
0311     // -----------------------------------------------------------------------
0312     /** @name Functions introduced in DOM Level 3 */
0313     //@{
0314     // -----------------------------------------------------------------------
0315     //  Feature methods
0316     // -----------------------------------------------------------------------
0317     /**
0318       * The DOMConfiguration object used by the LSSerializer when serializing a DOM node.
0319       *
0320       * In addition to the parameters recognized in on the <code>DOMConfiguration</code>
0321       * interface defined in [DOM Level 3 Core], the <code>DOMConfiguration</code> objects
0322       * for <code>DOMLSSerializer</code> add or modify the following parameters:
0323       *
0324       * "canonical-form"
0325       *     true [optional]
0326       *         Writes the document according to the rules specified in [Canonical XML]. In addition to
0327       *         the behavior described in "canonical-form" [DOM Level 3 Core], setting this parameter to
0328       *         true will set the parameters "format-pretty-print", "discard-default-content", and
0329       *         "xml-declaration", to false. Setting one of those parameters to true will set this
0330       *         parameter to false. Serializing an XML 1.1 document when "canonical-form" is true will
0331       *         generate a fatal error.
0332       *     false [required] (default)
0333       *         Do not canonicalize the output.
0334       *
0335       * "discard-default-content"
0336       *     true [required] (default)
0337       *         Use the DOMAttr::getSpecified attribute to decide what attributes should be discarded.
0338       *         Note that some implementations might use whatever information available to the implementation
0339       *         (i.e. XML schema, DTD, the DOMAttr::getSpecified attribute, and so on) to determine what
0340       *         attributes and content to discard if this parameter is set to true.
0341       *     false [required]
0342       *         Keep all attributes and all content.
0343       *
0344       * "format-pretty-print"
0345       *     true [optional]
0346       *         Formatting the output by adding whitespace to produce a pretty-printed, indented,
0347       *         human-readable form. The exact form of the transformations is not specified by this specification.
0348       *         Pretty-printing changes the content of the document and may affect the validity of the document,
0349       *         validating implementations should preserve validity.
0350       *     false [required] (default)
0351       *         Don't pretty-print the result.
0352       *
0353       * "ignore-unknown-character-denormalizations"
0354       *     true [required] (default)
0355       *         If, while verifying full normalization when [XML 1.1] is supported, a character is encountered
0356       *         for which the normalization properties cannot be determined, then raise a "unknown-character-denormalization"
0357       *         warning (instead of raising an error, if this parameter is not set) and ignore any possible
0358       *         denormalizations caused by these characters.
0359       *     false [optional]
0360       *         Report a fatal error if a character is encountered for which the processor cannot determine the
0361       *         normalization properties.
0362       *
0363       * "normalize-characters"
0364       *     This parameter is equivalent to the one defined by <code>DOMConfiguration</code> in [DOM Level 3 Core].
0365       *     Unlike in the Core, the default value for this parameter is true. While DOM implementations are not
0366       *     required to support fully normalizing the characters in the document according to appendix E of [XML 1.1],
0367       *     this parameter must be activated by default if supported.
0368       *
0369       * "xml-declaration"
0370       *     true [required] (default)
0371       *         If a DOMDocument, DOMElement, or DOMEntity node is serialized, the XML declaration, or text declaration,
0372       *         should be included. The version (DOMDocument::xmlVersion if the document is a Level 3 document and the
0373       *         version is non-null, otherwise use the value "1.0"), and the output encoding (see DOMLSSerializer::write
0374       *         for details on how to find the output encoding) are specified in the serialized XML declaration.
0375       *     false [required]
0376       *         Do not serialize the XML and text declarations. Report a "xml-declaration-needed" warning if this will
0377       *         cause problems (i.e. the serialized data is of an XML version other than [XML 1.0], or an encoding would
0378       *         be needed to be able to re-parse the serialized data).
0379       *
0380       * "error-handler"
0381       *     Contains a DOMErrorHandler object. If an error is encountered in the document, the implementation will call back
0382       *     the DOMErrorHandler registered using this parameter. The implementation may provide a default DOMErrorHandler
0383       *     object. When called, DOMError::relatedData will contain the closest node to where the error occurred.
0384       *     If the implementation is unable to determine the node where the error occurs, DOMError::relatedData will contain
0385       *     the DOMDocument node. Mutations to the document from within an error handler will result in implementation
0386       *     dependent behavior.
0387       *
0388       * @return The pointer to the configuration object.
0389       * @since DOM Level 3
0390       */
0391     virtual DOMConfiguration* getDomConfig() = 0;
0392 
0393     // -----------------------------------------------------------------------
0394     //  Setter methods
0395     // -----------------------------------------------------------------------
0396     /**
0397      * The end-of-line sequence of characters to be used in the XML being
0398      * written out. The only permitted values are these:
0399      * <dl>
0400      * <dt><code>null</code></dt>
0401      * <dd>
0402      * Use a default end-of-line sequence. DOM implementations should choose
0403      * the default to match the usual convention for text files in the
0404      * environment being used. Implementations must choose a default
0405      * sequence that matches one of those allowed by  2.11 "End-of-Line
0406      * Handling". However, Xerces-C++ always uses LF when this
0407      * property is set to <code>null</code> since otherwise automatic
0408      * translation of LF to CR-LF on Windows for text files would
0409      * result in such files containing CR-CR-LF. If you need Windows-style
0410      * end of line sequences in your output, consider writing to a file
0411      * opened in text mode or explicitly set this property to CR-LF.</dd>
0412      * <dt>CR</dt>
0413      * <dd>The carriage-return character (\#xD).</dd>
0414      * <dt>CR-LF</dt>
0415      * <dd> The
0416      * carriage-return and line-feed characters (\#xD \#xA). </dd>
0417      * <dt>LF</dt>
0418      * <dd> The line-feed
0419      * character (\#xA). </dd>
0420      * </dl>
0421      * <br>The default value for this attribute is <code>null</code>.
0422      *
0423      * @param newLine      The end-of-line sequence of characters to be used.
0424      * @see   getNewLine
0425      * @since DOM Level 3
0426      */
0427     virtual void          setNewLine(const XMLCh* const newLine) = 0;
0428 
0429     /**
0430      * When the application provides a filter, the serializer will call out
0431      * to the filter before serializing each Node. Attribute nodes are never
0432      * passed to the filter. The filter implementation can choose to remove
0433      * the node from the stream or to terminate the serialization early.
0434      *
0435      * @param filter       The writer filter to be used.
0436      * @see   getFilter
0437      * @since DOM Level 3
0438      */
0439     virtual void         setFilter(DOMLSSerializerFilter *filter) = 0;
0440 
0441     // -----------------------------------------------------------------------
0442     //  Getter methods
0443     // -----------------------------------------------------------------------
0444     /**
0445      * Return the end-of-line sequence of characters to be used in the XML being
0446      * written out.
0447      *
0448      * @return             The end-of-line sequence of characters to be used.
0449      * @see   setNewLine
0450      * @since DOM Level 3
0451      */
0452      virtual const XMLCh*       getNewLine() const = 0;
0453 
0454     /**
0455      * Return the WriterFilter used.
0456      *
0457      * @return             The writer filter used.
0458      * @see   setFilter
0459      * @since DOM Level 3
0460      */
0461      virtual DOMLSSerializerFilter*   getFilter() const = 0;
0462 
0463     // -----------------------------------------------------------------------
0464     //  Write methods
0465     // -----------------------------------------------------------------------
0466     /**
0467      * Write out the specified node as described above in the description of
0468      * <code>DOMLSSerializer</code>. Writing a Document or Entity node produces a
0469      * serialized form that is well formed XML. Writing other node types
0470      * produces a fragment of text in a form that is not fully defined by
0471      * this document, but that should be useful to a human for debugging or
0472      * diagnostic purposes.
0473      *
0474      * @param nodeToWrite The <code>Document</code> or <code>Entity</code> node to
0475      *   be written. For other node types, something sensible should be
0476      *   written, but the exact serialized form is not specified.
0477      * @param destination The destination for the data to be written.
0478      * @return  Returns <code>true</code> if <code>node</code> was
0479      *   successfully serialized and <code>false</code> in case a failure
0480      *   occured and the failure wasn't canceled by the error handler.
0481      * @since DOM Level 3
0482      */
0483     virtual bool       write(const DOMNode*         nodeToWrite,
0484                              DOMLSOutput* const destination) = 0;
0485 
0486     /**
0487      * Write out the specified node as described above in the description of
0488      * <code>DOMLSSerializer</code>. Writing a Document or Entity node produces a
0489      * serialized form that is well formed XML. Writing other node types
0490      * produces a fragment of text in a form that is not fully defined by
0491      * this document, but that should be useful to a human for debugging or
0492      * diagnostic purposes.
0493      *
0494      * @param nodeToWrite The <code>Document</code> or <code>Entity</code> node to
0495      *   be written. For other node types, something sensible should be
0496      *   written, but the exact serialized form is not specified.
0497      * @param uri The destination for the data to be written.
0498      * @return  Returns <code>true</code> if <code>node</code> was
0499      *   successfully serialized and <code>false</code> in case a failure
0500      *   occured and the failure wasn't canceled by the error handler.
0501      * @since DOM Level 3
0502      */
0503     virtual bool       writeToURI(const DOMNode*    nodeToWrite,
0504                                   const XMLCh*      uri) = 0;
0505     /**
0506      * Serialize the specified node as described above in the description of
0507      * <code>DOMLSSerializer</code>. The result of serializing the node is
0508      * returned as a string. Writing a Document or Entity node produces a
0509      * serialized form that is well formed XML. Writing other node types
0510      * produces a fragment of text in a form that is not fully defined by
0511      * this document, but that should be useful to a human for debugging or
0512      * diagnostic purposes.
0513      *
0514      * @param nodeToWrite  The node to be written.
0515      * @param manager  The memory manager to be used to allocate the result string.
0516      *   If NULL is used, the memory manager used to construct the serializer will
0517      *   be used.
0518      * @return  Returns the serialized data, or <code>null</code> in case a
0519      *   failure occured and the failure wasn't canceled by the error
0520      *   handler.   The returned string is always in UTF-16.
0521      *   The encoding information available in DOMLSSerializer is ignored in writeToString().
0522      * @since DOM Level 3
0523      */
0524     virtual XMLCh*     writeToString(const DOMNode* nodeToWrite, MemoryManager* manager = NULL) = 0;
0525 
0526     //@}
0527 
0528     // -----------------------------------------------------------------------
0529     //  Non-standard Extension
0530     // -----------------------------------------------------------------------
0531     /** @name Non-standard Extension */
0532     //@{
0533     /**
0534      * Called to indicate that this Writer is no longer in use
0535      * and that the implementation may relinquish any resources associated with it.
0536      *
0537      * Access to a released object will lead to unexpected result.
0538      */
0539     virtual void              release() = 0;
0540     //@}
0541 
0542 
0543 };
0544 
0545 XERCES_CPP_NAMESPACE_END
0546 
0547 #endif