GXml.XParser – GXml-0.20 Reference Manual

# XParser

## Object Hierarchy:

## Description:

public class XParser : Object, Parser

Parser implementation using libxml2 engine

Namespace: GXml
Package: GXml-0.20

## Content:

### Properties:

- public bool backup { get; set; }
- public Cancellable? cancellable { get; set; }
- public bool indent { get; set; }
- public DomNode node { get; }
- public HashTable<Type,HashTable<string,Type>> types { get; }

### Creation methods:

- public XParser (DomNode node)

### Methods:

- public DomElement? create_element (DomNode parent) throws Error
  Creates a new DomElement and append it as a child of parent.
- public InputStream create_stream () throws Error
  Creates an GLib.InputStream to write a string representation in XML
- public async InputStream create_stream_async () throws Error
  Creates asynchronically an GLib.InputStream to write a string representation in XML
- public bool current_is_document ()
  Check if current node found by parser, is a DomDocument
- public bool current_is_element ()
  Check if current node found by parser, is a DomElement
- public bool current_is_empty_element ()
  Check if current node has children.
- public string current_node_name ()
  Returns current node's local name, found by parser.
- public bool move_next_node () throws Error
  Use parser to go to next parsed node.
- public bool read_child_node (DomNode parent) throws Error
- public void read_child_nodes_stream (InputStream istream) throws Error
- public async void read_child_nodes_stream_async (InputStream istream) throws Error
- public void read_child_nodes_string (string str) throws Error
- public void read_element (DomElement element) throws Error
- public void read_node (DomNode node) throws Error
  Reads a node using current parser.
- public void read_stream (InputStream istream) throws Error
- public async void read_stream_async (InputStream istream) throws Error
- public void read_string (string str) throws Error
- public async void read_string_async (string str) throws Error
- public string read_unparsed () throws Error
  Reads all child nodes as string
- public void write_stream (OutputStream stream) throws Error
- public async void write_stream_async (OutputStream stream) throws Error
- public string write_string () throws Error
- public async string write_string_async () throws Error

### Inherited Members:

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.Parser

- add_element_collection
- backup
- cancellable
- create_element
- create_stream
- create_stream_async
- current_is_document
- current_is_element
- current_is_empty_element
- current_node_name
- indent
- move_next_node

- node
- read_child_element
- read_child_node
- read_child_nodes
- read_child_nodes_async
- read_child_nodes_stream
- read_child_nodes_string
- read_element
- read_element_property
- read_file
- read_file_async
- read_stream

- read_stream_async
- read_string
- read_string_async
- read_unparsed
- types
- write_file
- write_file_async
- write_stream
- write_stream_async
- write_string
- write_string_async