PyXdmAtomicValue

class PyXdmAtomicValue

Bases: PyXdmItem

The class PyXdmAtomicValue represents an item in an XPath sequence that is an atomic value. The value may belong to any of the 19 primitive types defined in XML Schema, or to a type derived from these primitive types, or the XPath type xs:untypedAtomic.

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

__eq__(value, /)

Return self==value.

__ge__(value, /)

Return self>=value.

__gt__(value, /)

Return self>value.

__hash__()

Return hash(self).

__int__()

int(self)

__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

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

Helper for pickle.

__repr__()

___repr__(self)

__setstate__()
__str__(self)

The string value of the node as returned by the toString method :returns: String value of this node :rtype: str

boolean_value

Get the boolean value of the PyXdmAtomicValue, converted using the XPath casting rules :returns: the result of converting to a boolean :rtype: bool

double_value

Get the double value of the PyXdmAtomicValue, converted using the XPath casting rules :returns: the result of converting to a double :rtype: double

get_string_value(self, encoding=None)

Property to get the string value of the atomic value as defined in the XPath data model :param encoding: The encoding of the string. If not specified then the platform default encoding is used. :type encoding: str

Returns:

The string value of this node

Return type:

str

head

Property to get the first item in the sequence represented by this PyXdmAtomicValue. Since a PyXdmItem is a sequence of length one, this returns the PyXdmAtomicValue itself. :returns: The PyXdmAtomicValue or None if the sequence is empty :rtype: PyXdmAtomicValue

integer_value

Get the integer value of the PyXdmAtomicValue, converted using the XPath casting rules :returns: the result of converting to an integer :rtype: int

primitive_type_name

Get the primitive type name of the PyXdmAtomicValue :returns: String of the primitive type name :rtype: str

string_value

Get the string value of the PyXdmAtomicValue, converted using the XPath casting rules :returns: the result of converting to a string :rtype: str