XdmAtomicValue
class XdmAtomicValue extends XdmItem (View source)
Methods
Get the string value of the item. For an atomic value, it has the same effect as casting the value to a string. In all cases the result is the same as applying the XPath string() function.
Determine whether the item is an atomic value or a node. Return TRUE if the item is an atomic value
Provided the item is an atomic value we return the XdmAtomicValue otherwise return null
Provided the item is a node value we return the XdmNode otherwise return null
Get the value converted to a boolean using the XPath casting rules
Get the value converted to a float using the XPath casting rules. If the value is a string, the XSD 1.1 rules are used, which means that the string "+INF" is recognised
Get the value converted to an integer using the XPath casting rules
Details
XdmItem
getHead()
Get the first item in the sequence
XdmItem
itemAt(int $index)
Get the n'th item in the value, counting from zero
int
size()
Get the number of items in the sequence
addXdmItem(XdmItem $item)
Add item to the sequence at the end.
string
getStringValue()
Get the string value of the item. For an atomic value, it has the same effect as casting the value to a string. In all cases the result is the same as applying the XPath string() function.
bool
isNode()
Determine whether the item is a node value or not.
bool
isAtomic()
Determine whether the item is an atomic value or a node. Return TRUE if the item is an atomic value
XdmAtomicValue|null
getAtomicValue()
Provided the item is an atomic value we return the XdmAtomicValue otherwise return null
XdmNode|null
getNodeValue()
Provided the item is a node value we return the XdmNode otherwise return null
bool
getBooleanValue()
Get the value converted to a boolean using the XPath casting rules
float
getDoubleValue()
Get the value converted to a float using the XPath casting rules. If the value is a string, the XSD 1.1 rules are used, which means that the string "+INF" is recognised
int
getLongValue()
Get the value converted to an integer using the XPath casting rules