|
|
Scala 2.3.3
|
class
ConstructingParser
extends scala.xml.parsing.ConstructingHandler
with scala.xml.parsing.ExternalSources
with scala.xml.parsing.MarkupParser
with scala.ScalaObject
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);
}
}
| Constructor Summary | |
def
this
(inp: scala.io.Source, presWS: scala.Boolean)
|
|
| Val Summary | |
val
input
: scala.io.Source
|
|
val
preserveWS
: scala.Boolean
|
|
| Val inherited from scala.xml.parsing.MarkupParser | |
| cbuf , handle |
| Var inherited from scala.xml.parsing.MarkupParser | |
| ch , curInput, doc, dtd, eof, extIndex, inpStack, pos, tmppos |
| Def Summary | |
override
|
def
log
(msg: java.lang.String)
: scala.Unit
|
| Def inherited from scala.xml.parsing.ConstructingHandler | |
| comment , elem, entityRef, procInstr, text |
| Def inherited from scala.xml.parsing.ExternalSources | |
| externalSource , externalSourceFromURL |
| Constructor Detail |
| Val Detail |
| Def Detail |