Package com.saxonica.xqj.pull
Class PullToStax
java.lang.Object
com.saxonica.xqj.pull.PullToStax
- All Implemented Interfaces:
- XMLStreamConstants,- XMLStreamReader
This class bridges PullProvider events to XMLStreamReader (Stax) events. That is, it acts
 as an XMLStreamReader, fetching the underlying data from a PullProvider.
 
A PullProvider may provide access to any XDM sequence, whereas an XMLStreamReader always reads a document. The conversion of a sequence to a document follows the rules for "normalizing" a sequence in the Serialization specification: for example, atomic values are converted into text nodes, with adjacent atomic values being space-separated.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classBridge a SAX SourceLocator to a javax.xml.stream.Location
- 
Field SummaryFields inherited from interface javax.xml.stream.XMLStreamConstantsATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
- 
Constructor SummaryConstructorsConstructorDescriptionPullToStax(PullProvider provider) Create a PullToStax instance, which wraps a Saxon PullProvider as a Stax XMLStreamReader
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()intgetAttributeLocalName(int i) getAttributeName(int i) getAttributeNamespace(int i) getAttributePrefix(int i) getAttributeType(int i) getAttributeValue(int i) getAttributeValue(String uri, String local) intgetName()intReturn the number of namespaces declared on this element.getNamespacePrefix(int i) getNamespaceURI(int i) getText()char[]intgetTextCharacters(int sourceStart, char[] target, int targetStart, int length) intintstatic XMLStreamReadergetXMLStreamReader(NodeInfo node) Create an XMLStreamReader that reads the contents of a tree rooted at a document or element nodebooleanhasName()booleanhasNext()booleanhasText()booleanisAttributeSpecified(int i) booleanbooleanbooleanbooleanbooleanintnext()intnextTag()voidboolean
- 
Constructor Details- 
PullToStaxCreate a PullToStax instance, which wraps a Saxon PullProvider as a Stax XMLStreamReader- Parameters:
- provider- the Saxon PullProvider from which the events will be read
 
 
- 
- 
Method Details- 
getXMLStreamReaderCreate an XMLStreamReader that reads the contents of a tree rooted at a document or element node- Parameters:
- node- the node to be read. This must be a document or element node
- Throws:
- IllegalArgumentException- if the node is not a document or element node
 
- 
getAttributeCountpublic int getAttributeCount()- Specified by:
- getAttributeCountin interface- XMLStreamReader
 
- 
isAttributeSpecifiedpublic boolean isAttributeSpecified(int i) - Specified by:
- isAttributeSpecifiedin interface- XMLStreamReader
 
- 
getAttributeName- Specified by:
- getAttributeNamein interface- XMLStreamReader
 
- 
getAttributeLocalName- Specified by:
- getAttributeLocalNamein interface- XMLStreamReader
 
- 
getAttributeNamespace- Specified by:
- getAttributeNamespacein interface- XMLStreamReader
 
- 
getAttributePrefix- Specified by:
- getAttributePrefixin interface- XMLStreamReader
 
- 
getAttributeType- Specified by:
- getAttributeTypein interface- XMLStreamReader
 
- 
getAttributeValue- Specified by:
- getAttributeValuein interface- XMLStreamReader
 
- 
getAttributeValue- Specified by:
- getAttributeValuein interface- XMLStreamReader
 
- 
getEventTypepublic int getEventType()- Specified by:
- getEventTypein interface- XMLStreamReader
 
- 
getNamespaceCountpublic int getNamespaceCount()Return the number of namespaces declared on this element.- Specified by:
- getNamespaceCountin interface- XMLStreamReader
- Returns:
- the number of in-scope namespaces
 
- 
getText- Specified by:
- getTextin interface- XMLStreamReader
 
- 
getTextLengthpublic int getTextLength()- Specified by:
- getTextLengthin interface- XMLStreamReader
 
- 
getTextStartpublic int getTextStart()- Specified by:
- getTextStartin interface- XMLStreamReader
 
- 
getTextCharacterspublic char[] getTextCharacters()- Specified by:
- getTextCharactersin interface- XMLStreamReader
 
- 
getTextCharacterspublic int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException - Specified by:
- getTextCharactersin interface- XMLStreamReader
- Throws:
- XMLStreamException
 
- 
next- Specified by:
- nextin interface- XMLStreamReader
- Throws:
- XMLStreamException
 
- 
nextTag- Specified by:
- nextTagin interface- XMLStreamReader
- Throws:
- XMLStreamException
 
- 
close- Specified by:
- closein interface- XMLStreamReader
- Throws:
- XMLStreamException
 
- 
hasNamepublic boolean hasName()- Specified by:
- hasNamein interface- XMLStreamReader
 
- 
hasNext- Specified by:
- hasNextin interface- XMLStreamReader
- Throws:
- XMLStreamException
 
- 
hasTextpublic boolean hasText()- Specified by:
- hasTextin interface- XMLStreamReader
 
- 
isCharacterspublic boolean isCharacters()- Specified by:
- isCharactersin interface- XMLStreamReader
 
- 
isEndElementpublic boolean isEndElement()- Specified by:
- isEndElementin interface- XMLStreamReader
 
- 
isStandalonepublic boolean isStandalone()- Specified by:
- isStandalonein interface- XMLStreamReader
 
- 
isStartElementpublic boolean isStartElement()- Specified by:
- isStartElementin interface- XMLStreamReader
 
- 
isWhiteSpacepublic boolean isWhiteSpace()- Specified by:
- isWhiteSpacein interface- XMLStreamReader
 
- 
standaloneSetpublic boolean standaloneSet()- Specified by:
- standaloneSetin interface- XMLStreamReader
 
- 
getCharacterEncodingScheme- Specified by:
- getCharacterEncodingSchemein interface- XMLStreamReader
 
- 
getElementText- Specified by:
- getElementTextin interface- XMLStreamReader
- Throws:
- XMLStreamException
 
- 
getEncoding- Specified by:
- getEncodingin interface- XMLStreamReader
 
- 
getLocalName- Specified by:
- getLocalNamein interface- XMLStreamReader
 
- 
getNamespaceURI- Specified by:
- getNamespaceURIin interface- XMLStreamReader
 
- 
getPIData- Specified by:
- getPIDatain interface- XMLStreamReader
 
- 
getPITarget- Specified by:
- getPITargetin interface- XMLStreamReader
 
- 
getPrefix- Specified by:
- getPrefixin interface- XMLStreamReader
 
- 
getVersion- Specified by:
- getVersionin interface- XMLStreamReader
 
- 
getNamespacePrefix- Specified by:
- getNamespacePrefixin interface- XMLStreamReader
 
- 
getNamespaceURI- Specified by:
- getNamespaceURIin interface- XMLStreamReader
 
- 
getNamespaceContext- Specified by:
- getNamespaceContextin interface- XMLStreamReader
 
- 
getName- Specified by:
- getNamein interface- XMLStreamReader
 
- 
getLocation- Specified by:
- getLocationin interface- XMLStreamReader
 
- 
getProperty- Specified by:
- getPropertyin interface- XMLStreamReader
- Throws:
- IllegalArgumentException
 
- 
require- Specified by:
- requirein interface- XMLStreamReader
- Throws:
- XMLStreamException
 
- 
getNamespaceURI- Specified by:
- getNamespaceURIin interface- XMLStreamReader
 
 
-