Package

scala.xml

parsing

Permalink

package parsing

Visibility
  1. Public
  2. All

Type Members

  1. trait ConsoleErrorHandler extends DefaultHandler

    Permalink
  2. abstract class ConstructingHandler extends MarkupHandler

    Permalink

    Implementation of MarkupHandler that constructs nodes.

    Implementation of MarkupHandler that constructs nodes.

    Version

    1.0

  3. class ConstructingParser extends ConstructingHandler with ExternalSources with MarkupParser

    Permalink

    An xml parser.

    An xml parser. parses XML and invokes callback methods of a MarkupHandler. Don't forget to call next.ch on a freshly instantiated parser in order to initialize it. If you get the parser from the object method, initialization is already done for you.

    object parseFromURL {
      def main(args: Array[String]) {
        val url = args(0)
        val src = scala.io.Source.fromURL(url)
        val cpa = scala.xml.parsing.ConstructingParser.fromSource(src, false) // fromSource initializes automatically
        val doc = cpa.document()
    
        // let's see what it is
        val ppr = new scala.xml.PrettyPrinter(80, 5)
        val ele = doc.docElem
        println("finished parsing")
        val out = ppr.format(ele)
        println(out)
      }
    }
  4. abstract class DefaultMarkupHandler extends MarkupHandler

    Permalink

    Default implementation of markup handler always returns NodeSeq.Empty

  5. trait ExternalSources extends AnyRef

    Permalink

    Version

    1.0

  6. abstract class FactoryAdapter extends DefaultHandler with XMLLoader[Node]

    Permalink

    SAX adapter class, for use with Java SAX parser.

    SAX adapter class, for use with Java SAX parser. Keeps track of namespace bindings, without relying on namespace handling of the underlying SAX parser.

  7. case class FatalError(msg: String) extends java.lang.RuntimeException with Product with Serializable

    Permalink

    !!! This is poorly named, but I guess it's in the API.

  8. abstract class MarkupHandler extends AnyRef

    Permalink

    class that handles markup - provides callback methods to MarkupParser.

    class that handles markup - provides callback methods to MarkupParser. the default is nonvalidating behaviour

    Version

    1.0

    To do

    expanding entity references

    ,

    can we ignore more entity declarations (i.e. those with extIDs)?

  9. trait MarkupParser extends MarkupParserCommon with TokenTests

    Permalink

    An XML parser.

    An XML parser.

    Parses XML 1.0, invokes callback methods of a MarkupHandler and returns whatever the markup handler returns. Use ConstructingParser if you just want to parse XML to construct instances of scala.xml.Node.

    While XML elements are returned, DTD declarations - if handled - are collected using side-effects.

    Version

    1.0

  10. class NoBindingFactoryAdapter extends FactoryAdapter with NodeFactory[Elem]

    Permalink

    nobinding adaptor providing callbacks to parser to create elements.

    nobinding adaptor providing callbacks to parser to create elements. implements hash-consing

  11. trait TokenTests extends AnyRef

    Permalink

    Helper functions for parsing XML fragments

  12. abstract class ValidatingMarkupHandler extends MarkupHandler

    Permalink
  13. class XhtmlParser extends ConstructingHandler with MarkupParser with ExternalSources

    Permalink

    An XML Parser that preserves CDATA blocks and knows about scala.xml.parsing.XhtmlEntities.

Value Members

  1. object ConstructingParser

    Permalink
  2. object XhtmlEntities

    Permalink

  3. object XhtmlParser

    Permalink

    Convenience method that instantiates, initializes and runs an XhtmlParser.

Ungrouped