net.sf.saxon.om
Interface Item

All Known Subinterfaces:
DocumentInfo, NodeInfo, SiblingCountingNode
All Known Implementing Classes:
AbstractNode, AtomicValue, DocumentImpl, DocumentWrapper, DocumentWrapper, NamespaceNode, NodeWrapper, NodeWrapper, Orphan, StrippedDocument, StrippedNode, TextFragmentValue, TinyDocumentImpl

public interface Item

An Item is an object that can occur as a member of a sequence. There are two kinds of Item: simple values, and nodes.


Method Summary
 int getItemType()
          Get the type of the item.
 java.lang.String getStringValue()
          Get the value of the item as a string
 Value getTypedValue()
          Get the typed value of the item
 

Method Detail

getStringValue

public java.lang.String getStringValue()
                                throws XPathException
Get the value of the item as a string

Returns:
the string value of the item
Throws:
XPathException - if the string value cannot be obtained. Some items have no string value, e.g. a QName

getItemType

public int getItemType()
Get the type of the item. This will be a value such as Type.INTEGER or Type.ATTRIBUTE

Returns:
an integer code identifying the type of the item, available as a constant net.sf.saxon.value.Type
See Also:
Type

getTypedValue

public Value getTypedValue()
                    throws XPathException
Get the typed value of the item

Returns:
the typed value of the item. In general this will be a sequence, though at present in Saxon the typed value is always a single atomic value
Throws:
XPathException - where no typed value is available, e.g. for an element with complex content