Trait/Object

eu.cdevreeze.yaidom.convert

StaxEventsToYaidomConversions

Related Docs: object StaxEventsToYaidomConversions | package convert

Permalink

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
Visibility
  1. Public
  2. All

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

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

    Permalink

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

  6. def clone(): AnyRef

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

    Permalink

    Converts a StAX Comment event to a yaidom Comment

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

    Permalink

    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
  9. final def convertToDocument(v: IndexedSeq[XMLEvent]): Document

    Permalink

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

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

    Permalink

    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.

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

    Permalink

    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.

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

    Permalink

    Converts a StAX EntityReference event to a yaidom EntityRef

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

    Permalink

    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.

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

    Permalink

    Converts a StAX ProcessingInstruction event to a yaidom ProcessingInstruction

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

    Permalink

    Converts a StAX Characters event to a yaidom Text

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

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

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

    Permalink

    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.

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

    Permalink

    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.

  28. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ConverterToDocument[Iterator[XMLEvent]]

Inherited from AnyRef

Inherited from Any

Ungrouped