in scala/xml/parsing
class ConstructingParser

class ConstructingParser(inp: Source, presWS: Boolean)
extends ConstructingHandler
with ScalaObject
with ExternalSources
with MarkupParser

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]): Unit = {
    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;
    Console.println("finished parsing");
    val out = ppr.format(ele);
    Console.println(out);
  }
}

Field Summary
  val input: Source
  val preserveWS: Boolean
     if true, does not remove surplus whitespace

Method Summary
override def log(msg: String): Unit
     this method should log the message given as argument somewhere as a side-effect

Methods inherited from java/lang/Object-class
clone, eq, equals, finalize, getClass, hashCode, ne, notify, notifyAll, synchronized, toString, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/ScalaObject-class
getScalaType

Methods inherited from scala/xml/parsing/ConstructingHandler-class
comment, elem, entityRef, procInstr, text

Methods inherited from scala/xml/parsing/ExternalSources-class
externalSource

Methods inherited from scala/xml/parsing/MarkupHandler-class
attListDecl, decls, elemDecl, elemEnd, elemStart, endDTD, ent, isValidating, lookupElemDecl, parameterEntityDecl, parsedEntityDecl, peReference, replacementText, unparsedEntityDecl

Methods inherited from scala/xml/parsing/MarkupParser-class
appendText, attrDecl, cbuf, ch, content, content1, curInput, document, dtd, element, element1, elementDecl, entityDecl, eof, extIndex, extSubset, externalID, inpStack, intSubset, markupDecl, markupDecl1, nextch, normalizeAttributeValue, notationDecl, parseDTD, pop, pos, prolog, pubidLiteral, push, pushExternal, putChar, reportSyntaxError, reportSyntaxError, reportValidationError, systemLiteral, textDecl, tmppos, xAttributeValue, xAttributes, xCharData, xCharRef, xComment, xEQ, xEndTag, xEntityValue, xName, xProcInstr, xSpace, xSpaceOpt, xTag, xText, xToken, xToken, xmlProcInstr

Methods inherited from scala/xml/parsing/TokenTests-class
checkPubID, checkSysID, isName, isNameChar, isNameStart, isPubIDChar, isSpace, isSpace, isValidIANAEncoding

Field Detail

preserveWS

  val preserveWS: Boolean
if true, does not remove surplus whitespace

input

  val input: Source
Method Detail

log

  override def log(msg: String): Unit
this method should log the message given as argument somewhere as a side-effect