GXml.XElement – GXml-0.20 Reference Manual

# XElement

## Object Hierarchy:

## Description:

public class XElement : XNonDocumentChildNode, DomParentNode, DomElement, XPathContext

DOM4 Class implementing GXml.DomElement interface, powered by libxml-2.0 library.

Namespace: GXml
Package: GXml-0.20

## Content:

### Properties:

- public DomNamedNodeMap attributes { owned get; }
- public int child_element_count { get; }
- public DomHTMLCollection children { owned get; }
- public DomTokenList class_list { owned get; }
- public string? class_name { owned get; set; }
- public string content { owned get; set; }
- public DomElement? first_element_child { owned get; }
- public string? id { owned get; set; }
- public DomElement? last_element_child { owned get; }
- public string local_name { owned get; }
- public string? namespace_uri { owned get; }
- public string? prefix { owned get; }
- public string tag_name { owned get; }
- public override string value { owned get; set; }

### Creation methods:

- public XElement (XDocument doc, unowned Node* node)

### Methods:

- public XPathObject evaluate (string expression, Map<string,string>? resolver = null) throws XPathObjectError
  Evaluate XPath expression.
- public DomNode? get_attr (string name)
- public string? get_attribute (string name)
- public string? get_attribute_ns (string? @namespace, string local_name)
- public DomHTMLCollection get_elements_by_class_name (string class_names)
- public DomHTMLCollection get_elements_by_tag_name (string local_name)
- public DomHTMLCollection get_elements_by_tag_name_ns (string? @namespace, string local_name)
- public DomNode? get_ns_attr (string name, string uri)
- public bool has_attribute (string name)
- public bool has_attribute_ns (string? @namespace, string local_name)
- public void normalize ()
- public DomNodeList query_selector_all (string selectors) throws Error
- public void remove_attr (string name)
- public void remove_attribute (string name)
- public void remove_attribute_ns (string? @namespace, string local_name)
- public void remove_ns_attr (string name, string uri)
- public void set_attr (string aname, string avalue)
- public void set_attribute (string name, string value) throws Error
- public void set_attribute_ns (string? @namespace, string name, string value) throws Error
- public void set_ns_attr (string ns, string aname, string value)
- public override string to_string ()
- public string write_string (Cancellable? cancellable = null)

### Inherited Members:

All known members inherited from class GXml.XNonDocumentChildNode

- next_element_sibling

- previous_element_sibling

All known members inherited from class GXml.XChildNode

- remove

All known members inherited from class GXml.XNode

- _base_uri
- _doc
- _node
- add_event_listener
- append_child
- attrs
- base_uri
- child_nodes
- children_nodes
- clone_node
- compare_document_position
- contains
- dispatch_event
- document
- first_child

- get_internal_node
- has_child_nodes
- insert_before
- is_default_namespace
- is_equal_node
- last_child
- lookup_namespace_uri
- lookup_prefix
- name
- next_sibling
- node_name
- node_type
- node_value
- normalize
- owned_node

- owner_document
- parent
- parent_element
- parent_node
- previous_sibling
- remove_child
- remove_event_listener
- replace_child
- set_namespace
- text_content
- to_gnode
- to_string
- type_node
- value

All known members inherited from class GLib.Object

- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data

- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer

- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref

All known members inherited from interface GXml.DomParentNode

- child_element_count
- children
- first_element_child

- get_elements_by_property_value
- last_element_child

- query_selector
- query_selector_all

All known members inherited from interface GXml.DomElement

- attributes
- class_list
- class_name
- create_stream
- create_stream_async
- get_attribute
- get_attribute_ns
- get_elements_by_class_name
- get_elements_by_tag_name
- get_elements_by_tag_name_ns
- has_attribute
- has_attribute_ns

- id
- local_name
- matches
- namespace_uri
- prefix
- read_from_file
- read_from_file_async
- read_from_stream
- read_from_stream_async
- read_from_string
- read_from_string_async
- read_from_uri

- read_from_uri_async
- remove_attribute
- remove_attribute_ns
- set_attribute
- set_attribute_ns
- tag_name
- write_file
- write_file_async
- write_stream
- write_stream_async
- write_string
- write_string_async

All known members inherited from interface GXml.XPathContext

- evaluate

All known members inherited from interface GXml.DomNonDocumentTypeChildNode

- next_element_sibling

- previous_element_sibling

All known members inherited from interface GXml.DomChildNode

- remove

All known members inherited from interface GXml.DomEventTarget

- add_event_listener

- dispatch_event

- remove_event_listener

All known members inherited from interface GXml.DomNode

- append_child
- base_uri
- child_nodes
- compare_document_position
- contains
- copy
- first_child
- has_child_nodes
- insert_before

- is_default_namespace
- is_equal_node
- last_child
- lookup_namespace_uri
- lookup_prefix
- next_sibling
- node_name
- node_type
- node_value

- normalize
- owner_document
- parent_element
- parent_node
- previous_sibling
- remove_child
- replace_child
- text_content