Base Framework
Public Member Functions | Protected Member Functions | List of all members
Attribute Class Reference

XML attribute. More...

#include <base/xml/Attribute.h>

Inherits Node.

Public Member Functions

 Attribute (Node node)
 
String getName () const noexcept
 
String getValue () const noexcept
 
void setValue (const String &value)
 
bool isSpecified () const noexcept
 
Node::ShadowElement getOwnerElement () noexcept
 
- Public Member Functions inherited from Node
 Node () noexcept
 
 Node (const Node &copy) noexcept
 
Nodeoperator= (const Node &assign) noexcept
 
Node appendChild (Node child)
 
Node insertBefore (Node newChild, Node refChild)
 
Node removeChild (Node child)
 
Node replaceChild (Node newChild, Node oldChild)
 
Node cloneNode (bool deep)
 
String getLocalName () const noexcept
 
String getNamespaceURI () const noexcept
 
String getName () const
 
NodeType getType () const
 
String getValue () const
 
ShadowDocument getOwnerDocument () noexcept
 
String getPrefix () const
 
void setPrefix (const String &prefix)
 
Node getParent () const noexcept
 
Node getPreviousSibling () const noexcept
 
Node getNextSibling () const noexcept
 
Node getFirstChild () const
 
Node getLastChild () const
 
bool hasAttributes () const noexcept
 
bool hasChildNodes () const
 
bool isSupported (const String &feature, const String &version) const noexcept
 
void normalize ()
 
void setValue (const String &value)
 
bool isValid () const noexcept
 
bool isInvalid () const noexcept
 
bool isUnlinked () const noexcept
 
bool isSame (const Node &node) const noexcept
 
bool operator== (const Node &node) const noexcept
 
bool hasSameOwner (const Node &node) const noexcept
 
bool isAncestor (const Node &node) const noexcept
 
 operator bool () const noexcept
 
 ~Node () noexcept
 

Protected Member Functions

 Attribute (void *context) noexcept
 
- Protected Member Functions inherited from Node
 Node (void *_context) noexcept
 
void * getContext () noexcept
 
const void * getContext () const noexcept
 

Additional Inherited Members

- Public Types inherited from Node
enum  NodeType {
  ELEMENT_NODE, ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE,
  ENTITY_REFERENCE_NODE, ENTITY_NODE, PROCESSING_INSTRUCTION_NODE, COMMENT_NODE,
  DOCUMENT_NODE, DOCUMENT_TYPE_NODE, DOCUMENT_FRAGMENT_NODE, NOTATION_NODE,
  ATTRIBUTE_DECL_NODE, ELEMENT_DECL_NODE, ENTITY_DECL_NODE
}
 

Detailed Description

XML attribute.

Version
1.0
Examples
testsuite/dom.cpp.

Constructor & Destructor Documentation

◆ Attribute()

Attribute::Attribute ( void *  context)
inlineprotectednoexcept

Initializes attribute.

Member Function Documentation

◆ getName()

String Attribute::getName ( ) const
noexcept

Returns the name of the attribute.

Examples
testsuite/dom.cpp.

◆ getOwnerElement()

Node::ShadowElement Attribute::getOwnerElement ( )
noexcept

Returns the owner element.

◆ getValue()

String Attribute::getValue ( ) const
noexcept

Returns the value of the attribute.

Examples
testsuite/dom.cpp.

◆ isSpecified()

bool Attribute::isSpecified ( ) const
noexcept

Returns true if the attribute value is explicitly specified in the original document.

◆ setValue()

void Attribute::setValue ( const String value)

Sets the value of the attribute.