eu.cdevreeze.yaidom.convert

StaxEventsToYaidomConversions

trait StaxEventsToYaidomConversions extends ConverterToDocument[Iterator[XMLEvent]]

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).

Linear Supertypes
ConverterToDocument[Iterator[XMLEvent]], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. StaxEventsToYaidomConversions
  2. ConverterToDocument
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. final def asIterator(xmlEventReader: XMLEventReader): Iterator[XMLEvent]

    Convenience method to turn an XMLEventReader into a Scala Iterator of XMLEvent objects.

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def convertToComment(event: Comment): Comment

    Converts a StAX Comment event to a yaidom Comment

  10. final def convertToDocument(v: Iterator[XMLEvent]): Document

    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.

    Definition Classes
    StaxEventsToYaidomConversionsConverterToDocument
  11. final def convertToDocument(v: IndexedSeq[XMLEvent]): Document

    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).

  12. final def convertToElem(v: Iterator[XMLEvent], parentScope: Scope): Elem

    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.

  13. final def convertToElem(v: IndexedSeq[XMLEvent], parentScope: Scope): Elem

    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.

  14. final def convertToEntityRef(event: EntityReference): EntityRef

    Converts a StAX EntityReference event to a yaidom EntityRef

  15. final def convertToEventWithEndStateIterator(events: Iterator[XMLEvent]): Iterator[EventWithEndState]

    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.

  16. final def convertToProcessingInstruction(event: ProcessingInstruction): ProcessingInstruction

    Converts a StAX ProcessingInstruction event to a yaidom ProcessingInstruction

  17. final def convertToText(event: Characters): Text

    Converts a StAX Characters event to a yaidom Text

  18. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  20. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  22. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  23. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. final def takeDocument(eventStateIterator: BufferedIterator[EventWithEndState]): DocumentWithRemainingEventStates

    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.

  29. final def takeElem(eventStateIterator: BufferedIterator[EventWithEndState]): ElemWithRemainingEventStates

    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.

  30. def toString(): String

    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ConverterToDocument[Iterator[XMLEvent]]

Inherited from AnyRef

Inherited from Any

Ungrouped