Rest.XmlParser

g GObject.Object GObject.Object Rest.XmlParser Rest.XmlParser GObject.Object->Rest.XmlParser

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

parse_from_data (data, len)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Rest.XmlParser(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Rest.XmlParserClass

A Xml Parser for Rest Responses

classmethod new()
Returns:

a new Rest.XmlParser.

Return type:

Rest.XmlParser

Create a new Rest.XmlParser, for parsing XML documents.

parse_from_data(data, len)
Parameters:
  • data (str) – the XML content to parse

  • len (int) – the length of data, or -1 if data is a nul-terminated string

Returns:

a new Rest.XmlNode, or None if the XML was invalid.

Return type:

Rest.XmlNode

Parse the XML in data, and return a new Rest.XmlNode. If data is invalid XML, None is returned.