|
Scala Library
|
|
class
ConstructingParser(val input : Source, val preserveWS : Boolean)
extends ConstructingHandler with ExternalSources with MarkupParser
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);
}
}
| Values and Variables inherited from MarkupParser | |
| curInput, inpStack, pos, extIndex, tmppos, ch, cbuf, dtd, doc, eof |
| Values and Variables inherited from MarkupHandler | |
| isValidating, decls, ent |
| Method Summary | |
override def
|
log
(msg : java.lang.String) : Unit
This method should log the message given as argument somewhere
as a side-effect.
|
| Methods inherited from MarkupParser | |
| xmlProcInstr, prolog, textDecl, document, putChar, nextch, xToken, xToken, xAttributes, xAttributeValue, xEntityValue, xTag, xEndTag, xCharData, xCharRef, xComment, appendText, content1, content, externalID, parseDTD, element, element1, xName, xEQ, xSpaceOpt, xSpace, xProcInstr, xText, systemLiteral, pubidLiteral, extSubset, markupDecl1, markupDecl, intSubset, elementDecl, attrDecl, entityDecl, notationDecl, reportSyntaxError, reportSyntaxError, reportValidationError, push, pushExternal, pop, normalizeAttributeValue |
| Methods inherited from TokenTests | |
| isSpace, isSpace, isNameChar, isNameStart, isName, isPubIDChar, isValidIANAEncoding, checkSysID, checkPubID |
| Methods inherited from ExternalSources | |
| externalSource |
| Methods inherited from ConstructingHandler | |
| elem, procInstr, comment, entityRef, text |
| Methods inherited from MarkupHandler | |
| lookupElemDecl, replacementText, endDTD, elemStart, elemEnd, elemDecl, attListDecl, parameterEntityDecl, parsedEntityDecl, unparsedEntityDecl, notationDecl, peReference |
| Methods inherited from AnyRef | |
| getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Method Details |
override
def
log(msg : java.lang.String) : Unit
msg - ...|
Scala Library
|
|