scala.xml.parsing
Members list
Type members
Classlikes
Attributes
- Supertypes
-
class DefaultHandler2trait EntityResolver2trait DeclHandlertrait LexicalHandlerclass DefaultHandlertrait ErrorHandlertrait ContentHandlertrait DTDHandlertrait EntityResolverclass Objecttrait Matchableclass AnyShow all
Implementation of MarkupHandler that constructs nodes.
Implementation of MarkupHandler that constructs nodes.
Attributes
- Supertypes
- Known subtypes
-
class ConstructingParserclass XhtmlParser
Attributes
- Companion
- class
- Supertypes
- Self type
-
ConstructingParser.type
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.
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)
}
}
Attributes
- Companion
- object
- Supertypes
-
trait MarkupParsertrait TokenTeststrait ExternalSourcesclass ConstructingHandlerclass MarkupHandlerclass Objecttrait Matchableclass AnyShow all
Default implementation of markup handler always returns NodeSeq.Empty
Default implementation of markup handler always returns NodeSeq.Empty
Attributes
- Supertypes
Attributes
- Supertypes
- Known subtypes
-
class ConstructingParserclass XhtmlParser
- Self type
SAX adapter class, for use with Java SAX parser. Keeps track of namespace bindings, without relying on namespace handling of the underlying SAX parser (but processing the parser's namespace-related events if it is namespace-aware).
SAX adapter class, for use with Java SAX parser. Keeps track of namespace bindings, without relying on namespace handling of the underlying SAX parser (but processing the parser's namespace-related events if it is namespace-aware).
Attributes
- Supertypes
-
class DefaultHandler2trait EntityResolver2trait DeclHandlertrait LexicalHandlerclass DefaultHandlertrait ErrorHandlertrait ContentHandlertrait DTDHandlertrait EntityResolverclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class NoBindingFactoryAdapter
!!! This is poorly named, but I guess it's in the API.
!!! This is poorly named, but I guess it's in the API.
Attributes
- Supertypes
-
trait Producttrait Equalsclass RuntimeExceptionclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
class that handles markup - provides callback methods to MarkupParser. the default is nonvalidating behaviour
class that handles markup - provides callback methods to MarkupParser. the default is nonvalidating behaviour
Attributes
- Todo
-
can we ignore more entity declarations (i.e. those with extIDs)?
expanding entity references
- Supertypes
- Known subtypes
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.
Attributes
- Supertypes
- Known subtypes
-
class ConstructingParserclass XhtmlParser
- Self type
nobinding adaptor providing callbacks to parser to create elements. implements hash-consing
nobinding adaptor providing callbacks to parser to create elements. implements hash-consing
Attributes
- Supertypes
-
trait NodeFactory[Elem]class FactoryAdapterclass DefaultHandler2trait EntityResolver2trait DeclHandlertrait LexicalHandlerclass DefaultHandlertrait ErrorHandlertrait ContentHandlertrait DTDHandlertrait EntityResolverclass Objecttrait Matchableclass AnyShow all
Helper functions for parsing XML fragments
Helper functions for parsing XML fragments
Attributes
- Supertypes
- Known subtypes
-
class ExternalIDobject NoExternalIDclass PublicIDclass SystemIDtrait MarkupParserclass ConstructingParserclass XhtmlParserobject UtilityShow all
Attributes
- Supertypes
- Self type
-
XhtmlEntities.type
An XML Parser that preserves CDATA
blocks and knows about scala.xml.parsing.XhtmlEntities.
An XML Parser that preserves CDATA
blocks and knows about scala.xml.parsing.XhtmlEntities.
Attributes
- Companion
- object
- Supertypes
-
trait ExternalSourcestrait MarkupParsertrait TokenTestsclass ConstructingHandlerclass MarkupHandlerclass Objecttrait Matchableclass AnyShow all
Convenience method that instantiates, initializes and runs an XhtmlParser
.
Convenience method that instantiates, initializes and runs an XhtmlParser
.
Attributes
- Companion
- class
- Supertypes
- Self type
-
XhtmlParser.type