Convenience method to turn an XMLEventReader into a Scala Iterator of XMLEvent objects.
Converts a StAX Comment
event to a yaidom Comment
Converts the given iterator of XMLEvent
instances to a yaidom Document
.
Converts the given iterator of XMLEvent
instances to a yaidom Document
.
First drops events until a "start document" event is found. After conversion, no "start/end document/element" events may be left.
Converts the given sequence of XMLEvent
instances to a yaidom Document
.
Converts the given sequence of XMLEvent
instances to a yaidom Document
. Invokes convertToDocument(v.iterator)
.
Converts the given iterator of XMLEvent
instances to a yaidom Elem
.
Converts the given iterator of XMLEvent
instances to a yaidom Elem
.
First drops events until a "start element" event is found. After conversion, no "start/end element" events may be left. The given parent scope is used.
Be careful: the namespaces inherited by the "start element event", if any, are ignored! In other words, the ancestry of the passed events is entirely ignored. This may cause an exception to be thrown, if there are indeed such namespaces, unless they are a subset of the passed parent scope.
Converts the given sequence of XMLEvent
instances to a yaidom Elem
.
Converts the given sequence of XMLEvent
instances to a yaidom Elem
. Invokes convertToElem(v.iterator, parentScope)
.
Be careful: the namespaces inherited by the "start element event", if any, are ignored! In other words, the ancestry of the passed events is entirely ignored. This may cause an exception to be thrown, if there are indeed such namespaces, unless they are a subset of the passed parent scope.
Converts a StAX EntityReference
event to a yaidom EntityRef
Converts the iterator of XMLEvents to an iterator of EventWithEndState objects.
Converts the iterator of XMLEvents to an iterator of EventWithEndState objects. This method can also be used in streaming scenarios, where only chunks of a large XML stream are kept in memory at any moment in time.
Converts a StAX ProcessingInstruction
event to a yaidom ProcessingInstruction
Converts a StAX Characters
event to a yaidom Text
Given a buffered iterator of EventWithEndState objects, converts the (initial) events to a Document.
Given a buffered iterator of EventWithEndState objects, converts the (initial) events to a Document. The remaining event end states are also returned in the result. The first event must be a StartDocument event, or else an exception is thrown.
The input iterator should come from a call to method convertToEventWithEndStateIterator
.
Given a buffered iterator of EventWithEndState objects, converts the (initial) events to a Elem.
Given a buffered iterator of EventWithEndState objects, converts the (initial) events to a Elem. The remaining event end states are also returned in the result. The first event must be a StartElement event, or else an exception is thrown.
The input iterator should come from a call to method convertToEventWithEndStateIterator
.
Converter from StAX events to yaidom nodes, in particular from
immutable.IndexedSeq[XMLEvent]
to eu.cdevreeze.yaidom.simple.Elem and to eu.cdevreeze.yaidom.simple.Document.There are also analogous conversions that take an
Iterator[XMLEvent]
instead. These can be used to reduce memory usage.This converter regards the input event stream more like an "ElemBuilder" than an "Elem", in that namespace declarations instead of scopes are extracted from input "elements", and in that conversions to yaidom Elems take an additional parent scope parameter (against which namespace declarations are resolved to get the scope of the yaidom element).