DOM Attribute class.
Definition dom_attr.h:67
DomString get_child_string(const DomString &name, const DomString &default_value=DomString()) const
Returns the text value of the child node with the given tag name.
void remove_attribute(const DomString &name)
Removes an attribute by name.
bool has_attribute(const DomString &name) const
Returns true if the element has the specified attribute.
bool get_attribute_bool(const DomString &name, bool default_value=false) const
Returns the boolean value of the attribute node with the given tag name.
void set_attribute_int(const DomString &name, int value)
Sets the attribute node with the specified tag name to the given integer value.
DomString get_child_string_ns(const DomString &namespace_uri, const DomString &local_name, const DomString &default_value=DomString()) const
Returns the text value of the child node with the given local name and namespace.
DomElement()
Constructs a DOM Element handle.
bool get_child_bool(const DomString &name, bool default_value=false) const
Returns the boolean value of the child node with the given tag name.
DomAttr set_attribute_node(const DomAttr &attr)
Set attribute node.
DomString get_tag_name() const
Returns the name of the element.
void set_child_bool(const DomString &name, bool value)
Sets the child node with the specified tag name to the given boolean value.
DomElement get_first_child_element() const
Returns the first child node that is an element node.
void remove_attribute_ns(const DomString &namespace_uri, const DomString &local_name)
bool get_attribute_bool_ns(const DomString &namespace_uri, const DomString &local_name, bool default_value=false) const
Returns the boolean value of the attribute node with the given local name and namespace.
void set_attribute_bool(const DomString &name, bool value)
Sets the attribute node with the specified tag name to the given boolean value.
void set_child_bool_ns(const DomString &namespace_uri, const DomString &qualified_name, bool value)
Sets the child node with the specified qualified name and namespace to the given boolean value.
void set_attribute_int_ns(const DomString &namespace_uri, const DomString &qualified_name, int value)
Sets the attribute node with the specified qualified name and namespace to the given integer value.
int get_child_int_ns(const DomString &namespace_uri, const DomString &local_name, int default_value=0) const
Returns the integer value of the child node with the given local name and namespace.
DomAttr get_attribute_node(const DomString &name) const
Get attribute node.
void set_child_string(const DomString &name, const DomString &value)
Sets the child node with the specified tag name to the given text value.
void set_attribute_float_ns(const DomString &namespace_uri, const DomString &qualified_name, float value, int num_decimal_places=6)
Sets the attribute node with the specified qualified name and namespace to the given floating-point v...
void set_attribute_bool_ns(const DomString &namespace_uri, const DomString &qualified_name, bool value)
Sets the attribute node with the specified qualified name and namespace to the given boolean value.
void set_child_int_ns(const DomString &namespace_uri, const DomString &qualified_name, int value)
Sets the child node with the specified qualified name and namespace to the given integer value.
int get_attribute_int(const DomString &name, int default_value=0) const
Returns the integer value of the attribute node with the given tag name.
int get_attribute_int_ns(const DomString &namespace_uri, const DomString &local_name, int default_value=0) const
Returns the integer value of the attribute node with the given local name and namespace.
void set_child_string_ns(const DomString &namespace_uri, const DomString &qualified_name, const DomString &value)
Sets the child node with the specified qualified name and namespace to the given text value.
DomElement get_next_sibling_element() const
Returns the next sibling node that is an element node.
bool get_child_bool_ns(const DomString &namespace_uri, const DomString &local_name, bool default_value=false) const
Returns the boolean value of the child node with the given local name and namespace.
DomAttr get_attribute_node_ns(const DomString &namespace_uri, const DomString &local_name) const
int get_child_int(const DomString &name, int default_value=0) const
Returns the integer value of the child node with the given tag name.
DomElement(const std::shared_ptr< DomNode_Impl > &impl)
Constructs a DomElement.
void set_attribute_float(const DomString &name, float value, int num_decimal_places=6)
Sets the attribute node with the specified tag name to the given floating-point value.
DomString get_attribute(const DomString &name) const
Returns the specified attribute.
float get_attribute_float(const DomString &name, float default_value=0.0f) const
Returns the floating-point value of the attribute node with the given tag name.
float get_attribute_float_ns(const DomString &namespace_uri, const DomString &local_name, float default_value=0.0f) const
Returns the floating-point value of the attribute node with the given local name and namespace.
DomString get_attribute_ns(const DomString &namespace_uri, const DomString &local_name, const DomString &default_value) const
void set_child_int(const DomString &name, int value)
Sets the child node with the specified tag name to the given integer value.
bool has_attribute_ns(const DomString &namespace_uri, const DomString &local_name) const
Returns true if the element has the specified attribute.
DomNodeList get_elements_by_tag_name(const DomString &name)
Returns a NodeList of all descendant elements with a given tag name.
void set_attribute(const DomString &name, const DomString &value)
Adds a new attribute.
void set_attribute_ns(const DomString &namespace_uri, const DomString &qualified_name, const DomString &value)
DomNodeList get_elements_by_tag_name_ns(const DomString &namespace_uri, const DomString &local_name)
DomString get_attribute(const DomString &name, const DomString &default_value) const
Get attribute.
DomElement(DomDocument &doc, const DomString &tag_name, const DomString &namespace_uri=DomString())
std::string get_text() const
Returns the text of all child Text nodes appended together.
DomString get_attribute_ns(const DomString &namespace_uri, const DomString &local_name) const
Returns the specified attribute.
DomAttr set_attribute_node_ns(const DomAttr &attr)
Set attribute node ns.
DOM Node List class.
Definition dom_node_list.h:51
friend class DomDocument
Definition dom_node.h:398
std::shared_ptr< DomNode_Impl > impl
Definition dom_node.h:396
std::string DomString
Definition dom_string.h:37