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

Home

Readme
Download
Installation
Build

API Docs
Samples
Schema

FAQs
Programming
Migration

Releases
Bug-Reporting
Feedback

Y2K Compliance
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  

IDOM_Node.hpp

Go to the documentation of this file.
00001 /*
00002  * The Apache Software License, Version 1.1
00003  *
00004  * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
00005  * reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions
00009  * are met:
00010  *
00011  * 1. Redistributions of source code must retain the above copyright
00012  *    notice, this list of conditions and the following disclaimer.
00013  *
00014  * 2. Redistributions in binary form must reproduce the above copyright
00015  *    notice, this list of conditions and the following disclaimer in
00016  *    the documentation and/or other materials provided with the
00017  *    distribution.
00018  *
00019  * 3. The end-user documentation included with the redistribution,
00020  *    if any, must include the following acknowledgment:
00021  *       "This product includes software developed by the
00022  *        Apache Software Foundation (http://www.apache.org/)."
00023  *    Alternately, this acknowledgment may appear in the software itself,
00024  *    if and wherever such third-party acknowledgments normally appear.
00025  *
00026  * 4. The names "Xerces" and "Apache Software Foundation" must
00027  *    not be used to endorse or promote products derived from this
00028  *    software without prior written permission. For written
00029  *    permission, please contact apache\@apache.org.
00030  *
00031  * 5. Products derived from this software may not be called "Apache",
00032  *    nor may "Apache" appear in their name, without prior written
00033  *    permission of the Apache Software Foundation.
00034  *
00035  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
00036  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00037  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00038  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
00039  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00040  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00041  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
00042  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00043  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00044  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
00045  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00046  * SUCH DAMAGE.
00047  * ====================================================================
00048  *
00049  * This software consists of voluntary contributions made by many
00050  * individuals on behalf of the Apache Software Foundation, and was
00051  * originally based on software copyright (c) 2001, International
00052  * Business Machines, Inc., http://www.ibm.com .  For more information
00053  * on the Apache Software Foundation, please see
00054  * <http://www.apache.org/>.
00055  */
00056 
00057 /*
00058  * $Id: IDOM_Node.hpp,v 1.2 2002/02/04 21:20:59 tng Exp $
00059  */
00060 
00061 #ifndef IDOM_Node_HEADER_GUARD_
00062 #define IDOM_Node_HEADER_GUARD_
00063 
00064 #include <xercesc/util/XercesDefs.hpp>
00065 
00066 
00067 class IDOM_Document;
00068 class IDOM_NamedNodeMap;
00069 class IDOM_NodeList;
00070 
00090 class   IDOM_Node {
00091 
00092     protected:
00095 
00100         IDOM_Node() {};
00101 
00107         IDOM_Node(const IDOM_Node &other) {};
00108 
00114         IDOM_Node & operator = (const IDOM_Node &other) {return *this;};
00115 
00116     public:
00117 
00119 
00121 
00125         virtual ~IDOM_Node() {};
00126 
00128 
00129 
00130     enum NodeType {
00131         ELEMENT_NODE                = 1,
00132         ATTRIBUTE_NODE              = 2,
00133         TEXT_NODE                   = 3,
00134         CDATA_SECTION_NODE          = 4,
00135         ENTITY_REFERENCE_NODE       = 5,
00136         ENTITY_NODE                 = 6,
00137         PROCESSING_INSTRUCTION_NODE = 7,
00138         COMMENT_NODE                = 8,
00139         DOCUMENT_NODE               = 9,
00140         DOCUMENT_TYPE_NODE          = 10,
00141         DOCUMENT_FRAGMENT_NODE      = 11,
00142         NOTATION_NODE               = 12,
00143         XML_DECL_NODE               = 13
00144     };
00145 
00148 
00152     virtual const XMLCh *   getNodeName() const = 0;
00153 
00160     virtual const XMLCh *       getNodeValue() const = 0;
00161 
00165     virtual short           getNodeType() const = 0;
00166 
00176     virtual IDOM_Node        *getParentNode() const = 0;
00177 
00191     virtual IDOM_NodeList    *getChildNodes() const = 0;
00197     virtual IDOM_Node        *getFirstChild() const = 0;
00198 
00204     virtual IDOM_Node        *getLastChild() const = 0;
00205 
00211     virtual IDOM_Node        *getPreviousSibling() const = 0;
00212 
00218     virtual IDOM_Node        *getNextSibling() const = 0;
00219 
00224     virtual IDOM_NamedNodeMap  *getAttributes() const = 0;
00225 
00236     virtual IDOM_Document      *getOwnerDocument() const = 0;
00237 
00238 
00240 
00242 
00261     virtual IDOM_Node        * cloneNode(bool deep) const = 0;
00262 
00264 
00266 
00293     virtual IDOM_Node       *insertBefore(IDOM_Node *newChild,
00294                                           IDOM_Node *refChild) = 0;
00295 
00296 
00319     virtual IDOM_Node  *replaceChild(IDOM_Node *newChild,
00320                                      IDOM_Node *oldChild) = 0;
00332     virtual IDOM_Node        *removeChild(IDOM_Node *oldChild) = 0;
00333 
00353     virtual IDOM_Node        *appendChild(IDOM_Node *newChild) = 0;
00354 
00356 
00358 
00366     virtual bool             hasChildNodes() const = 0;
00367 
00368 
00369 
00371 
00373 
00374 
00388     virtual void              setNodeValue(const XMLCh  *nodeValue) = 0;
00389 
00391 
00393 
00414     virtual void              normalize() = 0;
00415 
00430     virtual bool              isSupported(const XMLCh *feature,
00431                                            const XMLCh *version) const = 0;
00432 
00447     virtual const XMLCh *         getNamespaceURI() const = 0;
00448 
00454     virtual const XMLCh *          getPrefix() const = 0;
00455 
00465     virtual const XMLCh *          getLocalName() const = 0;
00466 
00499     virtual void              setPrefix(const XMLCh * prefix) = 0;
00500 
00506     virtual bool              hasAttributes() const = 0;
00507 
00509 
00510 
00511 };
00512 
00513 
00514 #endif
00515 


Copyright © 2000 The Apache Software Foundation. All Rights Reserved.