public interface JPhyloIOXMLEventReader extends JPhyloIOEventReader
Modifier and Type | Method and Description |
---|---|
javax.xml.stream.XMLEventReader |
createMetaXMLEventReader()
Creates a new
XMLEventReader that allows to read events of XML content of literal metadata from this
JPhyloIO event reader instance through that interface. |
javax.xml.stream.XMLStreamReader |
createMetaXMLStreamReader()
Creates a
XMLStreamReader that allows to read events of XML content of literal metadata from this
JPhyloIO event reader instance through that interface. |
javax.xml.namespace.NamespaceContext |
getNamespaceContext()
Returns the namespace context that is valid at the current position of the document.
|
addEventListener, close, getLastNonCommentEvent, getParentInformation, getPreviousEvent, hasNextEvent, next, nextOfType, peek, removeEventListener
getFormatID
javax.xml.namespace.NamespaceContext getNamespaceContext()
JPhyloIOEventReader.next()
.
Applications can use this namespace context e.g. to handle custom XML in literal meta events. In such cases, the according context
object should be requested (and saved if necessary) before the next call of JPhyloIOEventReader.next()
, because prefix to namespace mapping
may already change by reading the data for the next event.
null
if the reader did not encounter the first XML tag of the document yetjavax.xml.stream.XMLEventReader createMetaXMLEventReader() throws java.lang.IllegalStateException
XMLEventReader
that allows to read events of XML content of literal metadata from this
JPhyloIO event reader instance through that interface. Instances can be created any time, while this instance is located
inside a literal metadata subsequence with the LiteralContentSequenceType.XML
, but not outside of such a sequence.
In principle this method may be called multiple times within the same literal metadata event subsequence, which would result in having multiple XML event reader instances delegating to the same JPhyloIO reader, although that is not recommended for performance reasons.
java.lang.IllegalStateException
- if no reader can be created at the current position (outside of a literal metadata event
subsequence with type LiteralContentSequenceType.XML
)javax.xml.stream.XMLStreamReader createMetaXMLStreamReader() throws java.lang.IllegalStateException
XMLStreamReader
that allows to read events of XML content of literal metadata from this
JPhyloIO event reader instance through that interface. Instances can be created any time, while this instance is located
inside a literal metadata subsequence with the LiteralContentSequenceType.XML
, but not outside of such a sequence.
In principle this method may be called multiple times within the same literal metadata event subsequence, which would result in having multiple XML event reader instances delegating to the same JPhyloIO reader, although that is not recommended for performance reasons.
java.lang.IllegalStateException
- if no reader can be created at the current position (outside of a literal metadata event
subsequence with type LiteralContentSequenceType.XML
)