Packages

  • package root
    Definition Classes
    root
  • package scala
    Definition Classes
    root
  • package xml

    This library provides support for the XML literal syntax in Scala programs.

    This library provides support for the XML literal syntax in Scala programs.

    val planets: scala.xml.Elem = <planets>
      <planet id="earth">
        <title>Earth</title>
        <mass unit="kg">5.9742e24</mass>
        <radius unit="m">6378.14e3</radius>
      </planet>
      <planet id="mars">
        <title>Mars</title>
        <mass unit="kg">0.64191e24</mass>
        <radius unit="m">3397.0e3</radius>
      </planet>
    </planets>

    Additionally, you can mix Scala expressions in your XML elements by using the curly brace notation:

    val sunMass = 1.99e30
    val sunRadius = 6.96e8
    val star = <star>
      <title>Sun</title>
      <mass unit="kg">{ sunMass }</mass>
      <radius unit="m">{ sunRadius }</radius>
      <surface unit="m²">{ 4 * Math.PI * Math.pow(sunRadius, 2) }</surface>
      <volume unit="m³">{ 4/3 * Math.PI * Math.pow(sunRadius, 3) }</volume>
    </star>

    An XML element, for example <star/> and <planet/>, is represented in this library as a case class, scala.xml.Elem.

    The sub-elements of XML values share a common base class, scala.xml.Node.

    However, the non-element declarations found in XML files share a different common base class, scala.xml.dtd.Decl. Additionally, document type declarations are represented by a different trait, scala.xml.dtd.DTD.

    For reading and writing XML data to and from files, see scala.xml.XML. The default parser of XML data is the Xerces parser and is provided in Java by javax.xml.parsers.SAXParser.

    A less greedy XML reader can return data as a sequential collection of events, see scala.xml.pull.XMLEventReader.

    For more control of the input, use the parser written in Scala that is provided, scala.xml.parsing.ConstructingParser.

    For working with XHTML input, use scala.xml.parsing.XhtmlParser.

    For more control of the output, use the scala.xml.PrettyPrinter.

    Utility methods for working with XML data are provided in scala.xml.Utility.

    XML values in Scala are immutable, but you can traverse and transform XML data with a scala.xml.transform.RuleTransformer.

    Definition Classes
    scala
  • package pull

    Classes needed to view an XML document as a series of events.

    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(
    
    )
    Definition Classes
    xml
  • EvComment
  • EvElemEnd
  • EvElemStart
  • EvEntityRef
  • EvProcInstr
  • EvText
  • ProducerConsumerIterator
  • XMLEvent
  • XMLEventReader
t

scala.xml.pull

ProducerConsumerIterator

trait ProducerConsumerIterator[T >: Null] extends Iterator[T]

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ProducerConsumerIterator
  2. Iterator
  3. IterableOnceOps
  4. IterableOnce
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class GroupedIterator[B >: A] extends AbstractIterator[collection.immutable.Seq[B]]
    Definition Classes
    Iterator

Abstract Value Members

  1. abstract val EndOfStream: T

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ++[B >: T](xs: ⇒ collection.IterableOnce[B]): collection.Iterator[B]
    Definition Classes
    Iterator
    Annotations
    @inline()
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. val MaxQueueSize: Int
  6. def addString(b: collection.mutable.StringBuilder): collection.mutable.StringBuilder
    Definition Classes
    IterableOnceOps
  7. def addString(b: collection.mutable.StringBuilder, sep: String): collection.mutable.StringBuilder
    Definition Classes
    IterableOnceOps
  8. def addString(b: collection.mutable.StringBuilder, start: String, sep: String, end: String): b.type
    Definition Classes
    IterableOnceOps
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def available(): Boolean
  11. def buffered: collection.BufferedIterator[T]
    Definition Classes
    Iterator
  12. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws(classOf[java.lang.CloneNotSupportedException])
  13. def collect[B](pf: PartialFunction[T, B]): collection.Iterator[B]
    Definition Classes
    Iterator → IterableOnceOps
  14. def collectFirst[B](pf: PartialFunction[T, B]): Option[B]
    Definition Classes
    IterableOnceOps
  15. def concat[B >: T](xs: ⇒ collection.IterableOnce[B]): collection.Iterator[B]
    Definition Classes
    Iterator
  16. def contains(elem: Any): Boolean
    Definition Classes
    Iterator
  17. def copyToArray[B >: T](xs: Array[B], start: Int, len: Int): xs.type
    Definition Classes
    IterableOnceOps
  18. def copyToArray[B >: T](xs: Array[B], start: Int): xs.type
    Definition Classes
    IterableOnceOps
  19. def count(p: (T) ⇒ Boolean): Int
    Definition Classes
    IterableOnceOps
  20. def distinct: collection.Iterator[T]
    Definition Classes
    Iterator
  21. def distinctBy[B](f: (T) ⇒ B): collection.Iterator[T]
    Definition Classes
    Iterator
  22. def drop(n: Int): collection.Iterator[T]
    Definition Classes
    Iterator → IterableOnceOps
  23. def dropWhile(p: (T) ⇒ Boolean): collection.Iterator[T]
    Definition Classes
    Iterator → IterableOnceOps
  24. def duplicate: (collection.Iterator[T], collection.Iterator[T])
    Definition Classes
    Iterator
  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  27. def exists(p: (T) ⇒ Boolean): Boolean
    Definition Classes
    IterableOnceOps
  28. def filter(p: (T) ⇒ Boolean): collection.Iterator[T]
    Definition Classes
    Iterator → IterableOnceOps
  29. def filterNot(p: (T) ⇒ Boolean): collection.Iterator[T]
    Definition Classes
    Iterator → IterableOnceOps
  30. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  31. def find(p: (T) ⇒ Boolean): Option[T]
    Definition Classes
    IterableOnceOps
  32. def flatMap[B](f: (T) ⇒ collection.IterableOnce[B]): collection.Iterator[B]
    Definition Classes
    Iterator → IterableOnceOps
  33. def flatten[B](implicit ev: (T) ⇒ collection.IterableOnce[B]): collection.Iterator[B]
    Definition Classes
    Iterator → IterableOnceOps
  34. def fold[A1 >: T](z: A1)(op: (A1, A1) ⇒ A1): A1
    Definition Classes
    IterableOnceOps
  35. def foldLeft[B](z: B)(op: (B, T) ⇒ B): B
    Definition Classes
    IterableOnceOps
  36. def foldRight[B](z: B)(op: (T, B) ⇒ B): B
    Definition Classes
    IterableOnceOps
  37. def forall(p: (T) ⇒ Boolean): Boolean
    Definition Classes
    IterableOnceOps
  38. def foreach[U](f: (T) ⇒ U): Unit
    Definition Classes
    IterableOnceOps
  39. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  40. def grouped[B >: T](size: Int): GroupedIterator[B]
    Definition Classes
    Iterator
  41. def hasNext: Boolean
    Definition Classes
    ProducerConsumerIterator → Iterator
  42. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  43. def indexOf[B >: T](elem: B, from: Int): Int
    Definition Classes
    Iterator
  44. def indexOf[B >: T](elem: B): Int
    Definition Classes
    Iterator
  45. def indexWhere(p: (T) ⇒ Boolean, from: Int): Int
    Definition Classes
    Iterator
  46. def interruptibly[A](body: ⇒ A): Option[A]
  47. def isEmpty: Boolean
    Definition Classes
    IterableOnceOps
  48. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  49. def iterator: collection.Iterator[T]
    Definition Classes
    Iterator → IterableOnce
  50. def knownSize: Int
    Definition Classes
    IterableOnceOps
  51. final def length: Int
    Definition Classes
    Iterator
  52. def map[B](f: (T) ⇒ B): collection.Iterator[B]
    Definition Classes
    Iterator → IterableOnceOps
  53. def max[B >: T](implicit ord: math.Ordering[B]): T
    Definition Classes
    IterableOnceOps
  54. def maxBy[B](f: (T) ⇒ B)(implicit cmp: math.Ordering[B]): T
    Definition Classes
    IterableOnceOps
  55. def maxByOption[B](f: (T) ⇒ B)(implicit cmp: math.Ordering[B]): Option[T]
    Definition Classes
    IterableOnceOps
  56. def maxOption[B >: T](implicit ord: math.Ordering[B]): Option[T]
    Definition Classes
    IterableOnceOps
  57. def min[B >: T](implicit ord: math.Ordering[B]): T
    Definition Classes
    IterableOnceOps
  58. def minBy[B](f: (T) ⇒ B)(implicit cmp: math.Ordering[B]): T
    Definition Classes
    IterableOnceOps
  59. def minByOption[B](f: (T) ⇒ B)(implicit cmp: math.Ordering[B]): Option[T]
    Definition Classes
    IterableOnceOps
  60. def minOption[B >: T](implicit ord: math.Ordering[B]): Option[T]
    Definition Classes
    IterableOnceOps
  61. def mkString: String
    Definition Classes
    IterableOnceOps
  62. def mkString(sep: String): String
    Definition Classes
    IterableOnceOps
  63. def mkString(start: String, sep: String, end: String): String
    Definition Classes
    IterableOnceOps
  64. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  65. def next(): T
    Definition Classes
    ProducerConsumerIterator → Iterator
  66. def nextOption(): Option[T]
    Definition Classes
    Iterator
  67. def nonEmpty: Boolean
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding("nonEmpty is defined as !isEmpty; override isEmpty instead", "2.13.0")
  68. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  69. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  70. def patch[B >: T](from: Int, patchElems: collection.Iterator[B], replaced: Int): collection.Iterator[B]
    Definition Classes
    Iterator
  71. def produce(x: T): Unit
  72. def product[B >: T](implicit num: math.Numeric[B]): B
    Definition Classes
    IterableOnceOps
  73. def reduce[B >: T](op: (B, B) ⇒ B): B
    Definition Classes
    IterableOnceOps
  74. def reduceLeft[B >: T](op: (B, T) ⇒ B): B
    Definition Classes
    IterableOnceOps
  75. def reduceLeftOption[B >: T](op: (B, T) ⇒ B): Option[B]
    Definition Classes
    IterableOnceOps
  76. def reduceOption[B >: T](op: (B, B) ⇒ B): Option[B]
    Definition Classes
    IterableOnceOps
  77. def reduceRight[B >: T](op: (T, B) ⇒ B): B
    Definition Classes
    IterableOnceOps
  78. def reduceRightOption[B >: T](op: (T, B) ⇒ B): Option[B]
    Definition Classes
    IterableOnceOps
  79. def reversed: collection.Iterable[T]
    Attributes
    protected
    Definition Classes
    IterableOnceOps
  80. def sameElements[B >: T](that: collection.IterableOnce[B]): Boolean
    Definition Classes
    Iterator
  81. def scanLeft[B](z: B)(op: (B, T) ⇒ B): collection.Iterator[B]
    Definition Classes
    Iterator → IterableOnceOps
  82. def size: Int
    Definition Classes
    IterableOnceOps
  83. def slice(from: Int, until: Int): collection.Iterator[T]
    Definition Classes
    Iterator → IterableOnceOps
  84. def sliceIterator(from: Int, until: Int): collection.Iterator[T]
    Attributes
    protected
    Definition Classes
    Iterator
  85. def sliding[B >: T](size: Int, step: Int): GroupedIterator[B]
    Definition Classes
    Iterator
  86. def span(p: (T) ⇒ Boolean): (collection.Iterator[T], collection.Iterator[T])
    Definition Classes
    Iterator → IterableOnceOps
  87. def sum[B >: T](implicit num: math.Numeric[B]): B
    Definition Classes
    IterableOnceOps
  88. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  89. def take(n: Int): collection.Iterator[T]
    Definition Classes
    Iterator → IterableOnceOps
  90. def takeWhile(p: (T) ⇒ Boolean): collection.Iterator[T]
    Definition Classes
    Iterator → IterableOnceOps
  91. def to[C1](factory: Factory[T, C1]): C1
    Definition Classes
    IterableOnceOps
  92. def toArray[B >: T](implicit arg0: ClassTag[B]): Array[B]
    Definition Classes
    IterableOnceOps
  93. def toIndexedSeq: collection.immutable.IndexedSeq[T]
    Definition Classes
    IterableOnceOps
  94. def toList: collection.immutable.List[T]
    Definition Classes
    IterableOnceOps
  95. def toMap[K, V](implicit ev: <:<[T, (K, V)]): Map[K, V]
    Definition Classes
    IterableOnceOps
  96. def toSeq: collection.immutable.Seq[T]
    Definition Classes
    IterableOnceOps
  97. def toSet[B >: T]: Set[B]
    Definition Classes
    IterableOnceOps
  98. def toString(): String
    Definition Classes
    Iterator → AnyRef → Any
  99. def toVector: collection.immutable.Vector[T]
    Definition Classes
    IterableOnceOps
  100. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  101. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  102. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws(classOf[java.lang.InterruptedException])
  103. def withFilter(p: (T) ⇒ Boolean): collection.Iterator[T]
    Definition Classes
    Iterator
  104. def zip[B](that: collection.IterableOnce[B]): collection.Iterator[(T, B)]
    Definition Classes
    Iterator
  105. def zipAll[A1 >: T, B](that: collection.IterableOnce[B], thisElem: A1, thatElem: B): collection.Iterator[(A1, B)]
    Definition Classes
    Iterator
  106. def zipWithIndex: collection.Iterator[(T, Int)]
    Definition Classes
    Iterator → IterableOnceOps

Deprecated Value Members

  1. final def /:[B](z: B)(op: (B, T) ⇒ B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use foldLeft instead of /:

  2. final def :\[B](z: B)(op: (T, B) ⇒ B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use foldRight instead of :\

  3. final def copyToBuffer[B >: T](dest: Buffer[B]): Unit
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use dest ++= coll instead

  4. def seq: ProducerConsumerIterator.this.type
    Definition Classes
    Iterator
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Iterator.seq always returns the iterator itself

  5. final def toBuffer[B >: T]: Buffer[B]
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use ArrayBuffer.from(it) instead of it.toBuffer

  6. final def toIterator: collection.Iterator[T]
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use .iterator instead of .toIterator

  7. final def toStream: collection.immutable.Stream[T]
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use Stream.from(it) instead of it.toStream

Inherited from collection.Iterator[T]

Inherited from collection.IterableOnce[T]

Inherited from AnyRef

Inherited from Any

Ungrouped