scala.xml

# pull

#### package pull

Classes needed to view an XML document as a series of events. The document is parsed by an scala.xml.pull.XMLEventReader instance. You can treat it as an scala.collection.Iterator to retrieve the events, which are all subclasses of scala.xml.pull.XMLEvent.

    scala> val source = Source.fromString("""1.0" encoding="UTF-8" standalone="yes"?>
    customvalue"?>
    BAR">
    ]>Hello&bar;>""")

    source: scala.io.Source = non-empty iterator

    scala> val reader = new XMLEventReader(source)
    reader: scala.xml.pull.XMLEventReader = non-empty iterator

    scala> reader.foreach{ println(_) }
    EvProcInstr(instruction,custom value="customvalue")
    EvText(
    )
    EvElemStart(null,foo,,)
    EvText(Hello)
    EvComment( this is a comment )
    EvElemStart(null,bar,,)
    EvText(BAR)
    EvElemEnd(null,bar)
    EvElemStart(null,bar,,)
    EvEntityRef(gt)
    EvElemEnd(null,bar)
    EvElemEnd(null,foo)
    EvText(

    )

Source
  package.scala

Linear Supertypes
AnyRef, Any
Content Hierarchy Learn more about scaladoc diagrams
Ordering

1. Alphabetic
2. By inheritance

Inherited

1. pull
2. AnyRef
3. Any

1. Hide All
2. Show all

Learn more about member selection
Visibility

1. Public
2. All

### Type Members

1. #### case class EvComment(text: String) extends XMLEvent with Product with Serializable

   A comment was encountered

2. #### case class EvElemEnd(pre: String, label: String) extends XMLEvent with Product with Serializable

   An Element's end tag was encountered.

3. #### case class EvElemStart(pre: String, label: String, attrs: MetaData, scope: NamespaceBinding) extends XMLEvent with Product with Serializable

   An Element's start tag was encountered.

4. #### case class EvEntityRef(entity: String) extends XMLEvent with Product with Serializable

   An entity reference was encountered.

5. #### case class EvProcInstr(target: String, text: String) extends XMLEvent with Product with Serializable

   A processing instruction was encountered.

6. #### case class EvText(text: String) extends XMLEvent with Product with Serializable

   A text node was encountered.

7. #### trait ProducerConsumerIterator[T >: scala.Null] extends Iterator[T]

8. #### trait XMLEvent extends AnyRef

   An XML event for pull parsing.

9. #### class XMLEventReader extends AbstractIterator[XMLEvent] with ProducerConsumerIterator[XMLEvent]

   Main entry point into creating an event-based XML parser.

### Inherited from AnyRef

### Inherited from Any

### Ungrouped