DOMElement.hpp
Go to the documentation of this file.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: DOMElement.hpp 792236 2009-07-08 17:22:35Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_DOMELEMENT_HPP)
#define XERCESC_INCLUDE_GUARD_DOMELEMENT_HPP
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNode.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class DOMAttr;
class DOMNodeList;
class DOMTypeInfo;
class CDOM_EXPORT DOMElement: public DOMNode {
protected:
// -----------------------------------------------------------------------
// Hidden constructors
// -----------------------------------------------------------------------
DOMElement() {}
DOMElement(const DOMElement &other) : DOMNode(other) {}
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
DOMElement & operator = (const DOMElement &);
public:
// -----------------------------------------------------------------------
// All constructors are hidden, just the destructor is available
// -----------------------------------------------------------------------
virtual ~DOMElement() {};
// -----------------------------------------------------------------------
// Virtual DOMElement interface
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
// Getter methods
// -----------------------------------------------------------------------
virtual const XMLCh * getTagName() const = 0;
virtual const XMLCh * getAttribute(const XMLCh *name) const = 0;
virtual DOMAttr * getAttributeNode(const XMLCh *name) const = 0;
virtual DOMNodeList * getElementsByTagName(const XMLCh *name) const = 0;
// -----------------------------------------------------------------------
// Setter methods
// -----------------------------------------------------------------------
virtual void setAttribute(const XMLCh *name,
const XMLCh *value) = 0;
virtual DOMAttr * setAttributeNode(DOMAttr *newAttr) = 0;
virtual DOMAttr * removeAttributeNode(DOMAttr *oldAttr) = 0;
virtual void removeAttribute(const XMLCh *name) = 0;
virtual const XMLCh * getAttributeNS(const XMLCh *namespaceURI,
const XMLCh *localName) const = 0;
virtual void setAttributeNS(const XMLCh *namespaceURI,
const XMLCh *qualifiedName, const XMLCh *value) = 0;
virtual void removeAttributeNS(const XMLCh *namespaceURI,
const XMLCh *localName) = 0;
virtual DOMAttr * getAttributeNodeNS(const XMLCh *namespaceURI,
const XMLCh *localName) const = 0;
virtual DOMAttr * setAttributeNodeNS(DOMAttr *newAttr) = 0;
virtual DOMNodeList * getElementsByTagNameNS(const XMLCh *namespaceURI,
const XMLCh *localName) const = 0;
virtual bool hasAttribute(const XMLCh *name) const = 0;
virtual bool hasAttributeNS(const XMLCh *namespaceURI,
const XMLCh *localName) const = 0;
virtual void setIdAttribute(const XMLCh* name, bool isId) = 0;
virtual void setIdAttributeNS(const XMLCh* namespaceURI, const XMLCh* localName, bool isId) = 0;
virtual void setIdAttributeNode(const DOMAttr *idAttr, bool isId) = 0;
virtual const DOMTypeInfo* getSchemaTypeInfo() const = 0;
// -----------------------------------------------------------------------
// DOMElementTraversal interface
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
// Getter methods
// -----------------------------------------------------------------------
virtual DOMElement * getFirstElementChild() const = 0;
virtual DOMElement * getLastElementChild() const = 0;
virtual DOMElement * getPreviousElementSibling() const = 0;
virtual DOMElement * getNextElementSibling() const = 0;
virtual XMLSize_t getChildElementCount() const = 0;
};
XERCES_CPP_NAMESPACE_END
#endif
XMLCh
char16_t XMLCh
Definition: Xerces_autoconf_config.hpp:118
DOMAttr
The DOMAttr class refers to an attribute of an XML element.
Definition: DOMAttr.hpp:57
DOMNodeList
The DOMNodeList interface provides the abstraction of an ordered collection of nodes.
Definition: DOMNodeList.hpp:45
XercesDefs.hpp
DOMElement::DOMElement
DOMElement(const DOMElement &other)
Definition: DOMElement.hpp:74
DOMElement::~DOMElement
virtual ~DOMElement()
Destructor.
Definition: DOMElement.hpp:96
DOMElement
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition: DOMElement.hpp:66
CDOM_EXPORT
#define CDOM_EXPORT
Definition: XercesDefs.hpp:166
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XMLSize_t
size_t XMLSize_t
Definition: Xerces_autoconf_config.hpp:110
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
DOMNode
The DOMNode interface is the primary datatype for the entire Document Object Model.
Definition: DOMNode.hpp:139
DOMElement::DOMElement
DOMElement()
Definition: DOMElement.hpp:73
DOMTypeInfo
The DOMTypeInfo interface represent a type used by DOMElement or DOMAttr nodes, specified in the sche...
Definition: DOMTypeInfo.hpp:35
DOMNode.hpp