Gsf.XMLIn

Fields

Name

Type

Access

Description

content

GLib.String

r/w

the current node content

doc

Gsf.XMLInDoc

r/w

Current document being parsed Gsf.XMLInDoc

node

Gsf.XMLInNode

r/w

current node (not on the stack)

node_stack

[object]

r

user_state

object

r/w

user data

Methods

check_ns (str, ns_id)

get_input ()

namecmp (str, ns_id, name)

push_state (doc, new_state, dtor, attrs)

set_silent_unknowns (silent)

Details

class Gsf.XMLIn
check_ns(str, ns_id)
Parameters:
  • str (str) – string to check

  • ns_id (int) – the namespace id

Returns:

a pointer to str after the namespace if successful, otherwise None.

Return type:

str or None

According to state is str in the namespace ns_id ?

get_input()
Returns:

(but does not reference) the stream being parsed.

Return type:

Gsf.Input

(New in 1.14.2)

namecmp(str, ns_id, name)
Parameters:
  • str (str) – The potentially namespace qualified node name.

  • ns_id (int) – The name space id to check

  • name (str) – The target node name

Returns:

True if str == ns_id:name according to state.

Return type:

bool

Checks to see if str is the same as ns_id::name with either an explicit namespace or the current default namespace.

push_state(doc, new_state, dtor, attrs)
Parameters:

Take the first node from doc as the current node and call its start handler.

set_silent_unknowns(silent)
Parameters:

silent (bool) – whether to be silent about unknown tags

(New in 1.14.33)

This provides a means to silently ignore unknown tags in contexts where they are expected.