http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Release Info

Installation
Download
Build

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

DOMWriter.hpp

Go to the documentation of this file.
00001 #ifndef DOMWriter_HEADER_GUARD_
00002 #define DOMWriter_HEADER_GUARD_
00003 
00004 /*
00005  * Copyright 2002,2004 The Apache Software Foundation.
00006  * 
00007  * Licensed under the Apache License, Version 2.0 (the "License");
00008  * you may not use this file except in compliance with the License.
00009  * You may obtain a copy of the License at
00010  * 
00011  *      http://www.apache.org/licenses/LICENSE-2.0
00012  * 
00013  * Unless required by applicable law or agreed to in writing, software
00014  * distributed under the License is distributed on an "AS IS" BASIS,
00015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  * See the License for the specific language governing permissions and
00017  * limitations under the License.
00018  */
00019 
00020 /*
00021  * $Id: DOMWriter.hpp,v 1.11 2004/09/08 13:55:39 peiyongz Exp $
00022  * $Log: DOMWriter.hpp,v $
00023  * Revision 1.11  2004/09/08 13:55:39  peiyongz
00024  * Apache License Version 2.0
00025  *
00026  * Revision 1.10  2003/03/07 19:59:09  tng
00027  * [Bug 11692] Unimplement the hidden constructors and assignment operator to remove warnings from gcc.
00028  *
00029  * Revision 1.9  2002/11/27 18:46:39  tng
00030  * Documentation: clarify that DOMWriter::writeToString always returns string in UTF-16
00031  *
00032  * Revision 1.8  2002/11/04 15:09:25  tng
00033  * C++ Namespace Support.
00034  *
00035  * Revision 1.7  2002/08/22 15:04:57  tng
00036  * Remove unused parameter variables in inline functions.
00037  *
00038  * Revision 1.6  2002/06/25 16:04:49  tng
00039  * DOM L3: add function release().
00040  *
00041  * Revision 1.5  2002/06/06 20:53:07  tng
00042  * Documentation Fix: Update the API Documentation for DOM headers
00043  *
00044  * Revision 1.4  2002/06/03 22:33:21  peiyongz
00045  * DOMWriter: constants moved to XMLUni
00046  *
00047  * Revision 1.3  2002/05/31 20:59:40  peiyongz
00048  * Add "introduced in DOM3"
00049  *
00050  * Revision 1.2  2002/05/30 16:25:33  tng
00051  * Fix doxygen warning message.
00052  *
00053  * Revision 1.1  2002/05/28 22:38:55  peiyongz
00054  * DOM3 Save Interface: DOMWriter/DOMWriterFilter
00055  *
00056  */
00057 
00278 #include <xercesc/dom/DOMNode.hpp>
00279 #include <xercesc/dom/DOMWriterFilter.hpp>
00280 #include <xercesc/dom/DOMErrorHandler.hpp>
00281 #include <xercesc/framework/XMLFormatter.hpp>
00282 
00283 XERCES_CPP_NAMESPACE_BEGIN
00284 
00285 class  DOMWriter {
00286 protected :
00287     // -----------------------------------------------------------------------
00288     //  Hidden constructors
00289     // -----------------------------------------------------------------------
00292     DOMWriter() {};
00294 private:        
00295     // -----------------------------------------------------------------------
00296     // Unimplemented constructors and operators
00297     // -----------------------------------------------------------------------
00300     DOMWriter(const DOMWriter &);
00301     DOMWriter & operator = (const DOMWriter &);
00303 
00304 
00305 public:
00306     // -----------------------------------------------------------------------
00307     //  All constructors are hidden, just the destructor is available
00308     // -----------------------------------------------------------------------
00315     virtual ~DOMWriter() {};
00317 
00318     // -----------------------------------------------------------------------
00319     //  Virtual DOMWriter interface
00320     // -----------------------------------------------------------------------
00323     // -----------------------------------------------------------------------
00324     //  Feature methods
00325     // -----------------------------------------------------------------------
00341     virtual bool           canSetFeature(const XMLCh* const featName
00342                                        , bool               state) const = 0;
00362     virtual void            setFeature(const XMLCh* const featName
00363                                      , bool               state) = 0;
00364 
00381     virtual bool               getFeature(const XMLCh* const featName) const = 0;
00382 
00383     // -----------------------------------------------------------------------
00384     //  Setter methods
00385     // -----------------------------------------------------------------------
00402     virtual void           setEncoding(const XMLCh* const encoding) = 0;
00403 
00432     virtual void          setNewLine(const XMLCh* const newLine) = 0;
00433 
00447     virtual void         setErrorHandler(DOMErrorHandler *errorHandler) = 0;
00448 
00461     virtual void         setFilter(DOMWriterFilter *filter) = 0;
00462 
00463     // -----------------------------------------------------------------------
00464     //  Getter methods
00465     // -----------------------------------------------------------------------
00475      virtual const XMLCh*       getEncoding() const = 0;
00476 
00487      virtual const XMLCh*       getNewLine() const = 0;
00488 
00499      virtual DOMErrorHandler*   getErrorHandler() const = 0;
00500 
00510      virtual DOMWriterFilter*   getFilter() const = 0;
00511 
00512     // -----------------------------------------------------------------------
00513     //  Write methods
00514     // -----------------------------------------------------------------------
00538     virtual bool       writeNode(XMLFormatTarget* const destination
00539                                , const DOMNode         &nodeToWrite) = 0;
00540 
00559     virtual XMLCh*     writeToString(const DOMNode &nodeToWrite) = 0;
00560 
00562 
00563     // -----------------------------------------------------------------------
00564     //  Non-standard Extension
00565     // -----------------------------------------------------------------------
00574     virtual void              release() = 0;
00576 
00577 
00578 };
00579 
00580 XERCES_CPP_NAMESPACE_END
00581 
00582 #endif


Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.