Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::dom::Node Class Reference

#include <arcane/core/Dom.h>

Inheritance diagram for Arcane::dom::Node:
Collaboration diagram for Arcane::dom::Node:

Public Member Functions

Attribute nodeName (DOM Level 1)
DOMString nodeName () const
Attribute nodeValue (DOM Level 1)
DOMString nodeValue () const
void nodeValue (const DOMString &value) const
Attribute nodeType (DOM Level 1)
UShort nodeType () const
Attribute parentNode (DOM Level 1)
Node parentNode () const
Attribute childNodes (DOM Level 1)
NodeList childNodes () const
Attribute firstChild() (DOM Level 1)
Node firstChild () const
Attribute lastChild() (DOM Level 1)
Node lastChild () const
Attribute previousSibling() (DOM Level 1)
Node previousSibling () const
Attribute nextSibling() (DOM Level 1)
Node nextSibling () const
Attribute attributes() (DOM Level 1)
NamedNodeMap attributes () const
Attribute ownerDocument() (DOM Level 2)
Document ownerDocument () const
DOM Level 1 operations
Node insertBefore (const Node &new_child, const Node &ref_child) const
Node replaceChild (const Node &new_child, const Node &old_child) const
Node removeChild (const Node &old_child) const
Node appendChild (const Node &new_child) const
bool hasChildNodes () const
Node cloneNode (bool deep) const
Attribute prefix() (DOM Level 2).
DOMString prefix () const
void prefix (const DOMString &new_prefix) const
DOM Level 2 operations
void normalize () const
bool isSupported (const DOMString &feature, const DOMString &version) const
DOMString namespaceURI () const
DOMString localName () const
Attribute textContent() (DOM Level 3)
DOMString textContent () const
void textContent (const DOMString &value) const
Attribute baseURI() (DOM Level 3)
DOMString baseURI () const

Static Public Attributes

NodeType

An integer indicating which type of node this is.

Note
Numeric codes up to 200 are reserved to W3C for possible future use.
static const UShort ELEMENT_NODE = 1
 The node is an Element.
static const UShort ATTRIBUTE_NODE = 2
 The node is an Attr.
static const UShort TEXT_NODE = 3
 The node is a Text node.
static const UShort CDATA_SECTION_NODE = 4
 The node is a CDATASection.
static const UShort ENTITY_REFERENCE_NODE = 5
 The node is an EntityReference.
static const UShort ENTITY_NODE = 6
 The node is an Entity.
static const UShort PROCESSING_INSTRUCTION_NODE = 7
 The node is a ProcessingInstruction.
static const UShort COMMENT_NODE = 8
 The node is a Comment.
static const UShort DOCUMENT_NODE = 9
 The node is a Document.
static const UShort DOCUMENT_TYPE_NODE = 10
 The node is a DocumentType.
static const UShort DOCUMENT_FRAGMENT_NODE = 11
 The node is a DocumentFragment.
static const UShort NOTATION_NODE = 12
 The node is a Notation.
TreePosition

A bitmask indicating the relative tree position of a node with respect to another node.

Issue TreePosition-1: Should we use fewer bits?

Issue TreePosition-2: How does a node compare to itself?

static const UShort TREE_POSITION_PRECEDING = 0x01
 The node precedes the reference node.
static const UShort TREE_POSITION_FOLLOWING = 0x02
 The node follows the reference node.
static const UShort TREE_POSITION_ANCESTOR = 0x04
 The node is an ancestor of the reference node.
static const UShort TREE_POSITION_DESCENDANT = 0x08
 The node is a descendant of the reference node.
static const UShort TREE_POSITION_SAME = 0x10
static const UShort TREE_POSITION_EXACT_SAME = 0x20
static const UShort TREE_POSITION_DISCONNECTED = 0x00
 The two nodes are disconnected, they do not have any common ancestor.

DOM Level 3 operations

class IDOM_Node
class IDOM_Document
class Attr
class Element
class Document
 GenericDocument with UTF8 encoding.
class DOMImplementation
class NamedNodeMap
class CharacterData
class Text
class DOMWriter
bool operator== (const Node &n1, const Node &n2)
NodePrv * toNodePrv (const Node &node)
NodePrv * m_p
 Class implementation.
bool isSameNode (const Node &node) const
UShort compareTreePosition (const Node &other) const
bool isEqualNode (const Node &other) const
Node getInterface (const DOMString &feature) const
DOMString lookupNamespacePrefix (const DOMString &namespace_uri, bool use_default) const
bool isDefaultNamespace (const DOMString &namespace_uri) const
DOMString lookupNamespaceURI (const DOMString &prefix) const
DOMObject setUserData (const DOMString &key, const DOMObject &data, const UserDataHandler &handler) const
DOMObject getUserData (const DOMString &key) const
void releaseNode ()
 Destroys the node.
bool _null () const
 Node (const Node &)
const Node & operator= (const Node &from)
 Node (NodePrv *)
void _assign (const Node &)
void _checkValid () const
NodePrv * _impl () const

Detailed Description

Definition at line 222 of file Dom.h.

Constructor & Destructor Documentation

◆ Node() [1/3]

Arcane::dom::Node::Node ( )

Definition at line 903 of file DomLibXml2V2.cc.

◆ Node() [2/3]

Arcane::dom::Node::Node ( const Node & from)

Definition at line 912 of file DomLibXml2V2.cc.

◆ ~Node()

Arcane::dom::Node::~Node ( )
virtual

Definition at line 1912 of file DomLibXml2.cc.

◆ Node() [3/3]

Arcane::dom::Node::Node ( NodePrv * p)

Definition at line 907 of file DomLibXml2V2.cc.

Member Function Documentation

◆ _assign()

void Arcane::dom::Node::_assign ( const Node & node)
protected

Definition at line 2026 of file DomLibXml2.cc.

◆ _checkValid()

void Arcane::dom::Node::_checkValid ( ) const
protected

Definition at line 1921 of file DomLibXml2.cc.

◆ _impl()

NodePrv * Arcane::dom::Node::_impl ( ) const
protected

Definition at line 1928 of file DomLibXml2.cc.

◆ _null()

bool Arcane::dom::Node::_null ( ) const

Definition at line 1915 of file DomLibXml2.cc.

◆ appendChild()

Node Arcane::dom::Node::appendChild ( const Node & new_child) const

Definition at line 2057 of file DomLibXml2.cc.

◆ attributes()

NamedNodeMap Arcane::dom::Node::attributes ( ) const

Definition at line 1995 of file DomLibXml2.cc.

◆ baseURI()

DOMString Arcane::dom::Node::baseURI ( ) const

Definition at line 2122 of file DomLibXml2.cc.

◆ childNodes()

NodeList Arcane::dom::Node::childNodes ( ) const

Definition at line 1980 of file DomLibXml2.cc.

◆ cloneNode()

Node Arcane::dom::Node::cloneNode ( bool deep) const

Definition at line 2072 of file DomLibXml2.cc.

◆ compareTreePosition()

UShort Arcane::Node::compareTreePosition ( const Node & other) const

Definition at line 2151 of file DomLibXml2.cc.

◆ firstChild()

Node Arcane::dom::Node::firstChild ( ) const

Definition at line 1941 of file DomLibXml2.cc.

◆ getInterface()

Node Arcane::Node::getInterface ( const DOMString & feature) const

Definition at line 2159 of file DomLibXml2.cc.

◆ getUserData()

DOMObject Arcane::dom::Node::getUserData ( const DOMString & key) const

Definition at line 2208 of file DomLibXml2.cc.

◆ hasChildNodes()

bool Arcane::dom::Node::hasChildNodes ( ) const

Definition at line 2065 of file DomLibXml2.cc.

◆ insertBefore()

Node Arcane::dom::Node::insertBefore ( const Node & new_child,
const Node & ref_child ) const

Definition at line 2032 of file DomLibXml2.cc.

◆ isDefaultNamespace()

bool Arcane::dom::Node::isDefaultNamespace ( const DOMString & namespace_uri) const

Definition at line 2173 of file DomLibXml2.cc.

◆ isEqualNode()

bool Arcane::dom::Node::isEqualNode ( const Node & other) const

Definition at line 2167 of file DomLibXml2.cc.

◆ isSameNode()

bool Arcane::dom::Node::isSameNode ( const Node & node) const

Definition at line 2144 of file DomLibXml2.cc.

◆ isSupported()

bool Arcane::dom::Node::isSupported ( const DOMString & feature,
const DOMString & version ) const

Definition at line 2101 of file DomLibXml2.cc.

◆ lastChild()

Node Arcane::dom::Node::lastChild ( ) const

Definition at line 1949 of file DomLibXml2.cc.

◆ localName()

DOMString Arcane::dom::Node::localName ( ) const

Definition at line 2115 of file DomLibXml2.cc.

◆ lookupNamespacePrefix()

DOMString Arcane::Node::lookupNamespacePrefix ( const DOMString & namespace_uri,
bool use_default ) const

Definition at line 2181 of file DomLibXml2.cc.

◆ lookupNamespaceURI()

DOMString Arcane::dom::Node::lookupNamespaceURI ( const DOMString & prefix) const

Definition at line 2190 of file DomLibXml2.cc.

◆ namespaceURI()

DOMString Arcane::dom::Node::namespaceURI ( ) const

Definition at line 2108 of file DomLibXml2.cc.

◆ nextSibling()

Node Arcane::dom::Node::nextSibling ( ) const

Definition at line 1965 of file DomLibXml2.cc.

◆ nodeName()

DOMString Arcane::dom::Node::nodeName ( ) const

Definition at line 1988 of file DomLibXml2.cc.

◆ nodeType()

UShort Arcane::dom::Node::nodeType ( ) const

Definition at line 1934 of file DomLibXml2.cc.

◆ nodeValue() [1/2]

DOMString Arcane::dom::Node::nodeValue ( ) const

Definition at line 2012 of file DomLibXml2.cc.

◆ nodeValue() [2/2]

void Arcane::dom::Node::nodeValue ( const DOMString & value) const

Definition at line 1022 of file DomLibXml2V2.cc.

◆ normalize()

void Arcane::dom::Node::normalize ( ) const

Definition at line 2094 of file DomLibXml2.cc.

◆ operator=()

const Node & Arcane::dom::Node::operator= ( const Node & from)

Definition at line 1905 of file DomLibXml2.cc.

◆ ownerDocument()

Document Arcane::dom::Node::ownerDocument ( ) const

Definition at line 2004 of file DomLibXml2.cc.

◆ parentNode()

Node Arcane::dom::Node::parentNode ( ) const

Definition at line 1972 of file DomLibXml2.cc.

◆ prefix() [1/2]

DOMString Arcane::dom::Node::prefix ( ) const

Definition at line 2080 of file DomLibXml2.cc.

◆ prefix() [2/2]

void Arcane::dom::Node::prefix ( const DOMString & new_prefix) const

Definition at line 2087 of file DomLibXml2.cc.

◆ previousSibling()

Node Arcane::dom::Node::previousSibling ( ) const

Definition at line 1957 of file DomLibXml2.cc.

◆ releaseNode()

void Arcane::dom::Node::releaseNode ( )

Destroys the node.

The node must not belong to a document.

The node must no longer be used afterwards.

This method is not part of the DOM but is necessary for certain implementations to delete the memory associated with a node.

Definition at line 1200 of file DomLibXml2V2.cc.

References m_p.

◆ removeChild()

Node Arcane::dom::Node::removeChild ( const Node & old_child) const

Definition at line 2049 of file DomLibXml2.cc.

◆ replaceChild()

Node Arcane::dom::Node::replaceChild ( const Node & new_child,
const Node & old_child ) const

Definition at line 2041 of file DomLibXml2.cc.

◆ setUserData()

DOMObject Arcane::dom::Node::setUserData ( const DOMString & key,
const DOMObject & data,
const UserDataHandler & handler ) const

Definition at line 2198 of file DomLibXml2.cc.

◆ textContent() [1/2]

DOMString Arcane::dom::Node::textContent ( ) const

Definition at line 2129 of file DomLibXml2.cc.

◆ textContent() [2/2]

void Arcane::dom::Node::textContent ( const DOMString & value) const

Definition at line 2136 of file DomLibXml2.cc.

◆ Attr

friend class Attr
friend

Definition at line 418 of file Dom.h.

◆ CharacterData

friend class CharacterData
friend

Definition at line 423 of file Dom.h.

◆ Document

friend class Document
friend

GenericDocument with UTF8 encoding.

Definition at line 420 of file Dom.h.

References Document.

Referenced by Document.

◆ DOMImplementation

friend class DOMImplementation
friend

Definition at line 421 of file Dom.h.

◆ DOMWriter

friend class DOMWriter
friend

Definition at line 425 of file Dom.h.

◆ Element

friend class Element
friend

Definition at line 419 of file Dom.h.

◆ IDOM_Document

friend class IDOM_Document
friend

Definition at line 417 of file Dom.h.

◆ IDOM_Node

friend class IDOM_Node
friend

Definition at line 416 of file Dom.h.

◆ NamedNodeMap

friend class NamedNodeMap
friend

Definition at line 422 of file Dom.h.

◆ operator==

bool operator== ( const Node & n1,
const Node & n2 )
friend

Definition at line 1207 of file DomLibXml2V2.cc.

◆ Text

friend class Text
friend

Definition at line 424 of file Dom.h.

◆ toNodePrv

NodePrv * toNodePrv ( const Node & node)
friend

Definition at line 261 of file DomLibXml2V2.cc.

Member Data Documentation

◆ ATTRIBUTE_NODE

const UShort Arcane::dom::Node::ATTRIBUTE_NODE = 2
static

The node is an Attr.

Definition at line 234 of file Dom.h.

Referenced by Arcane::XmlNode::xpathFullName().

◆ CDATA_SECTION_NODE

const UShort Arcane::dom::Node::CDATA_SECTION_NODE = 4
static

The node is a CDATASection.

Definition at line 238 of file Dom.h.

◆ COMMENT_NODE

const UShort Arcane::dom::Node::COMMENT_NODE = 8
static

The node is a Comment.

Definition at line 246 of file Dom.h.

◆ DOCUMENT_FRAGMENT_NODE

const UShort Arcane::dom::Node::DOCUMENT_FRAGMENT_NODE = 11
static

The node is a DocumentFragment.

Definition at line 252 of file Dom.h.

◆ DOCUMENT_NODE

const UShort Arcane::dom::Node::DOCUMENT_NODE = 9
static

The node is a Document.

Definition at line 248 of file Dom.h.

◆ DOCUMENT_TYPE_NODE

const UShort Arcane::dom::Node::DOCUMENT_TYPE_NODE = 10
static

The node is a DocumentType.

Definition at line 250 of file Dom.h.

◆ ELEMENT_NODE

const UShort Arcane::dom::Node::ELEMENT_NODE = 1
static

The node is an Element.

Definition at line 232 of file Dom.h.

Referenced by Arcane::XmlNode::setValue(), and Arcane::XmlNode::xpathFullName().

◆ ENTITY_NODE

const UShort Arcane::dom::Node::ENTITY_NODE = 6
static

The node is an Entity.

Definition at line 242 of file Dom.h.

◆ ENTITY_REFERENCE_NODE

const UShort Arcane::dom::Node::ENTITY_REFERENCE_NODE = 5
static

The node is an EntityReference.

Definition at line 240 of file Dom.h.

◆ m_p

NodePrv* Arcane::dom::Node::m_p
protected

Class implementation.

Definition at line 430 of file Dom.h.

Referenced by releaseNode().

◆ NOTATION_NODE

const UShort Arcane::dom::Node::NOTATION_NODE = 12
static

The node is a Notation.

Definition at line 254 of file Dom.h.

◆ PROCESSING_INSTRUCTION_NODE

const UShort Arcane::dom::Node::PROCESSING_INSTRUCTION_NODE = 7
static

The node is a ProcessingInstruction.

Definition at line 244 of file Dom.h.

◆ TEXT_NODE

const UShort Arcane::dom::Node::TEXT_NODE = 3
static

The node is a Text node.

Definition at line 236 of file Dom.h.

◆ TREE_POSITION_ANCESTOR

const UShort Arcane::dom::Node::TREE_POSITION_ANCESTOR = 0x04
static

The node is an ancestor of the reference node.

Definition at line 356 of file Dom.h.

◆ TREE_POSITION_DESCENDANT

const UShort Arcane::dom::Node::TREE_POSITION_DESCENDANT = 0x08
static

The node is a descendant of the reference node.

Definition at line 358 of file Dom.h.

◆ TREE_POSITION_DISCONNECTED

const UShort Arcane::dom::Node::TREE_POSITION_DISCONNECTED = 0x00
static

The two nodes are disconnected, they do not have any common ancestor.

Definition at line 369 of file Dom.h.

◆ TREE_POSITION_EXACT_SAME

const UShort Arcane::dom::Node::TREE_POSITION_EXACT_SAME = 0x20
static

The two nodes have the exact same position. This is never the case of two attributes, even when they have the same ownerElement. Two nodes that have the exact same position have the same position, though the reverse may not be true.

Definition at line 367 of file Dom.h.

◆ TREE_POSITION_FOLLOWING

const UShort Arcane::dom::Node::TREE_POSITION_FOLLOWING = 0x02
static

The node follows the reference node.

Definition at line 354 of file Dom.h.

◆ TREE_POSITION_PRECEDING

const UShort Arcane::dom::Node::TREE_POSITION_PRECEDING = 0x01
static

The node precedes the reference node.

Definition at line 352 of file Dom.h.

◆ TREE_POSITION_SAME

const UShort Arcane::dom::Node::TREE_POSITION_SAME = 0x10
static

The two nodes have the same position. This is the case of two attributes that have the same ownerElement()

Definition at line 361 of file Dom.h.


The documentation for this class was generated from the following files: