PyXdmValue

class PyXdmValue

Bases: object

A PyXdmValue represents a value in the XDM data model. A value is a sequence of zero or more items, each item being an atomic value, a node, or a function item.

Creates a new instance, keeping a reference to its PySaxonProcessor :param processor:

__getitem__(self, index)

Implement the built-in subscript operator (i.e. square brackets []) to return the ith item in the sequence

Returns:

The item at the specified index. This could be a PyXdmItem or any of its subclasses: PyXdmAtomicValue, PyXdmNode, PyXdmFunctionItem, PyXdmMap or PyXdmArray. If the item does not exist returns None.

Return type:

PyXdmItem

__init__()

Creates a new instance, keeping a reference to its PySaxonProcessor :param processor:

__iter__(self)

Returns the Iterator object of PyXdmValue

classmethod __new__(*args, **kwargs)
__pyx_vtable__ = <capsule object NULL>
__reduce__()

Helper for pickle.

__repr__(self)

The string representation of PyXdmItem

__setstate__()
__str__(self)

The string representation of PyXdmItem

add_xdm_item(self, PyXdmItem value)

Add an item to the XDM sequence :param value: The PyXdmItem object to add to the sequence :type value: PyXdmItem

head

Property to get the first item in the sequence :returns: The first item or None if the sequence is empty :rtype: PyXdmItem

item_at(self, index)

Get the n’th item in the sequence, counting from zero. :param index: the index of the item required, counting from zero :type index: int

Returns:

The item at the specified index. This could be a PyXdmItem or any of its subclasses: PyXdmAtomicValue, PyXdmNode, PyXdmFunctionItem, PyXdmMap or PyXdmArray. If the item does not exist returns None.

Return type:

PyXdmItem

size

Get the number of items in the sequence :returns: The count of items in the sequence :rtype: int

class PyXdmValueIterator

Bases: object

Iterator class for PyXdmValue

__init__(*args, **kwargs)
__iter__()

Implement iter(self).

classmethod __new__(*args, **kwargs)
__next__()

Returns the next value from PyXdmValue object’s lists

__reduce__()

Helper for pickle.

__reduce_cython__()
__setstate__()
__setstate_cython__(__pyx_state)