EDataServer.XmlDocument¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class EDataServer.XmlDocument(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Contains only private data that should be read and manipulated using the functions below.
New in version 3.26.
- classmethod new(ns_href, root_element)¶
- Parameters:
- Returns:
a new
EDataServer.XmlDocument
; free it withGObject.Object.unref
(), when no longer needed.- Return type:
Creates a new
EDataServer.XmlDocument
with root element root_element and optionally also with set default namespace ns_href.New in version 3.26.
- add_attribute(ns_href, name, value)¶
- Parameters:
Adds a new attribute to the current element. Use
None
ns_href, to use the default namespace, otherwise either previously added namespace with the same href from e_xml_document_add_namespaces() is picked, or a new namespace with generated prefix is added.New in version 3.26.
- add_attribute_double(ns_href, name, value)¶
- Parameters:
Adds a new attribute with a double value to the current element. Use
None
ns_href, to use the default namespace, otherwise either previously added namespace with the same href from e_xml_document_add_namespaces() is picked, or a new namespace with generated prefix is added.New in version 3.26.
- add_attribute_int(ns_href, name, value)¶
- Parameters:
Adds a new attribute with an integer value to the current element. Use
None
ns_href, to use the default namespace, otherwise either previously added namespace with the same href from e_xml_document_add_namespaces() is picked, or a new namespace with generated prefix is added.New in version 3.26.
- add_attribute_time(ns_href, name, value)¶
- Parameters:
Adds a new attribute with a time_t value in ISO 8601 format to the current element. The format is “YYYY-MM-DDTHH:MM:py:data::SSZ<EDataServer.XmlDocument.props.SSZ>". Use
None
ns_href, to use the default namespace, otherwise either previously added namespace with the same href from e_xml_document_add_namespaces() is picked, or a new namespace with generated prefix is added.New in version 3.26.
- add_attribute_time_ical(ns_href, name, value)¶
- Parameters:
Adds a new attribute with a time_t value in iCalendar format to the current element. The format is “YYYYMMDDTHHMMSSZ”. Use
None
ns_href, to use the default namespace, otherwise either previously added namespace with the same href from e_xml_document_add_namespaces() is picked, or a new namespace with generated prefix is added.New in version 3.32.
- add_empty_element(ns_href, name)¶
- Parameters:
Adds an empty element, which is an element with no attribute and no value.
It’s the same as calling
EDataServer.XmlDocument.start_element
() immediately followed byEDataServer.XmlDocument.end_element
().New in version 3.26.
- end_element()¶
This is a pair function for
EDataServer.XmlDocument.start_element
() andEDataServer.XmlDocument.start_text_element
(), which changes current element to the parent of that element.New in version 3.26.
- get_content()¶
- Returns:
Content of the self as newly allocated string. Free it with
GLib.free
(), when no longer needed.- out_length:
optional return location for length of the content, or
None
- Return type:
Gets content of the self as string. The string is nul-terminated, but if out_length is also provided, then it doesn’t contain this additional nul character.
New in version 3.26.
- get_xmldoc()¶
- Returns:
Underlying
libxml2.DocPtr
.- Return type:
New in version 3.26.
- start_element(ns_href, name)¶
- Parameters:
Starts a new non-text element as a child of the current element. Each such call should be ended with corresponding
EDataServer.XmlDocument.end_element
(). UseNone
ns_href, to use the default namespace, otherwise either previously added namespace with the same href from e_xml_document_add_namespaces() is picked, or a new namespace with generated prefix is added.To start a text node use
EDataServer.XmlDocument.start_text_element
().New in version 3.26.
- start_text_element(ns_href, name)¶
- Parameters:
Starts a new text element as a child of the current element. Each such call should be ended with corresponding
EDataServer.XmlDocument.end_element
(). UseNone
ns_href, to use the default namespace, otherwise either previously added namespace with the same href from e_xml_document_add_namespaces() is picked, or a new namespace with generated prefix is added.To start a non-text node use
EDataServer.XmlDocument.start_element
().New in version 3.26.
- write_base64(value, len)¶
-
Writes value of length len, encoded to base64, as content of the current element.
New in version 3.26.
- write_buffer(value, len)¶
-
Writes value of length len as content of the current element.
New in version 3.26.
- write_double(value)¶
- Parameters:
value (
float
) – value to write as the content
Writes value as content of the current element.
New in version 3.26.
- write_int(value)¶
- Parameters:
value (
int
) – value to write as the content
Writes value as content of the current element.
New in version 3.26.