EDataServer.XmlDocument¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new(ns_href, root_element) | 
| add_attribute(ns_href, name, value) | |
| add_attribute_double(ns_href, name, value) | |
| add_attribute_int(ns_href, name, value) | |
| add_attribute_time(ns_href, name, value) | |
| add_attribute_time_ical(ns_href, name, value) | |
| add_empty_element(ns_href, name) | |
| end_element() | |
| get_content() | |
| get_xmldoc() | |
| start_element(ns_href, name) | |
| start_text_element(ns_href, name) | |
| write_base64(value, len) | |
| write_buffer(value, len) | |
| write_double(value) | |
| write_int(value) | |
| write_string(value) | |
| write_time(value) | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
Properties¶
None
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class EDataServer.XmlDocument(**kwargs)¶
- Bases: - GObject.Object- Abstract: - No - Structure: - EDataServer.XmlDocumentClass- 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 with- GObject.Object.unref(), when no longer needed.- Return type: - Creates a new - EDataServer.XmlDocumentwith 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 - Nonens_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 - Nonens_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 - Nonens_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 - Nonens_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 - Nonens_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 by- EDataServer.XmlDocument.end_element().- New in version 3.26. 
 - 
end_element()¶
- This is a pair function for - EDataServer.XmlDocument.start_element() and- EDataServer.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: - ( - str, out_length:- int)- 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: - libxml2.Doc- 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(). Use- Nonens_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(). Use- Nonens_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)¶
- Parameters: - Writes value of length len, encoded to base64, as content of the current element. - New in version 3.26. 
 - 
write_buffer(value, len)¶
- Parameters: - 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. 
 
- 
classmethod