Packages

  • package root
    Definition Classes
    root
  • package scala
    Definition Classes
    root
  • package xml
    Definition Classes
    scala
  • package dtd
    Definition Classes
    xml
  • package factory
    Definition Classes
    xml
  • Binder
  • LoggedNodeFactory
  • NodeFactory
  • XMLLoader
  • package include
    Definition Classes
    xml
  • package parsing
    Definition Classes
    xml
  • package persistent
    Definition Classes
    xml
  • 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
  • package transform
    Definition Classes
    xml
p

scala.xml

factory

package factory

Type Members

  1. abstract class Binder extends ValidatingMarkupHandler

  2. trait NodeFactory [A <: Node] extends AnyRef
  3. trait XMLLoader [T <: Node] extends AnyRef

    Presents collection of XML loading methods which use the parser created by "def parser".

  4. trait LoggedNodeFactory [A <: Node] extends NodeFactory[A]

    This class logs what the nodefactory is actually doing.

    This class logs what the nodefactory is actually doing. If you want to see what happens during loading, use it like this:

    object testLogged extends App {
    val x = new scala.xml.parsing.NoBindingFactoryAdapter
    with scala.xml.factory.LoggedNodeFactory[scala.xml.Elem] {
    override def log(s: String) = println(s)
    }
    
    Console.println("Start")
    val doc = x.load(new java.net.URL("http://example.com/file.xml"))
    Console.println("End")
    Console.println(doc)
    }
    Annotations
    @deprecated
    Deprecated

    (Since version 2.11) This trait will be removed.

    Version

    1.0

Ungrouped