|
Scala 2
|
class
MarkupParser
extends
java.lang.Object with
TokenTests with
ScalaObjectConstructingParser
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.Def Summary | |
def
appendText
( pos : scala.Int , ts : NodeBuffer , txt : java.lang.String )
: scala.Unit
|
|
def
attrDecl
: scala.Unit
<! attlist := ATTLIST |
|
def
content
( pscope : NamespaceBinding )
: NodeSeq
content1 ::= '<' content1 | '&' charref ... |
|
def
content1
( pscope : NamespaceBinding , ts : NodeBuffer )
: scala.Unit
'<' content1 ::= ... |
|
def
document
: Document
[22] prolog ::= XMLDecl? Misc (doctypedecl Misc)? [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>' [24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"') [25] Eq ::= S? '=' S? [26] VersionNum ::= '1.0' [27] Misc ::= Comment | PI | S |
|
def
element
( pscope : NamespaceBinding )
: NodeSeq
|
|
def
element1
( pscope : NamespaceBinding )
: NodeSeq
'<' element ::= xmlTag1 '>' { xmlExpr | '{' simpleExpr '}' } ETag | xmlTag1 '/' '>' |
|
def
elementDecl
: scala.Unit
<! element := ELEMENT |
|
def
entityDecl
: scala.Unit
<! element := ELEMENT |
|
def
extSubset
: scala.Unit
|
|
def
externalID
: ExternalID
externalID ::= SYSTEM S syslit PUBLIC S pubid S syslit |
|
def
externalSource
( systemLiteral : java.lang.String )
: Source
|
|
def
input
: Source
|
|
def
intSubset
: scala.Unit
"rec-xml/#ExtSubset" pe references may not occur within markup declarations |
|
def
markupDecl
: scala.Unit
|
|
def
markupDecl1
: scala.Any
|
|
def
nextch
: scala.Unit
this method assign the next character to ch and advances in input |
|
def
normalizeAttributeValue
( attval : java.lang.String )
: java.lang.String
for the moment, replace only character references see spec 3.3.3 precond: cbuf empty |
|
def
notationDecl
: scala.Unit
'N' notationDecl ::= "OTATION" |
|
def
parseDTD
: scala.Unit
parses document type declaration and assigns it to instance variable dtd. <! parseDTD ::= DOCTYPE name ... > |
|
def
pop
: scala.Unit
|
|
def
preserveWS
: scala.Boolean
if true, does not remove surplus whitespace |
|
def
prolog
: Tuple3
<? prolog ::= xml S // this is a bit more lenient than necessary... |
|
def
pubidLiteral
: java.lang.String
|
|
def
push
( entityName : java.lang.String )
: scala.Unit
|
|
def
pushExternal
( systemId : java.lang.String )
: scala.Unit
|
|
protected
|
def
putChar
( c : scala.Char )
: java.lang.StringBuffer
append Unicode character to name buffer |
def
reportSyntaxError
( pos : scala.Int , str : java.lang.String )
: scala.Unit
report a syntax error |
|
def
reportSyntaxError
( str : java.lang.String )
: scala.Unit
|
|
def
reportValidationError
( pos : scala.Int , str : java.lang.String )
: scala.Unit
report a syntax error |
|
def
systemLiteral
: java.lang.String
attribute value, terminated by either ' or ". value may not contain <. AttValue ::= `'` { _ } `'` | `"` { _ } `"` |
|
def
textDecl
: Tuple2
prolog, but without standalone |
|
def
xAttributeValue
: java.lang.String
attribute value, terminated by either ' or ". value may not contain <. AttValue ::= `'` { _ } `'` | `"` { _ } `"` |
|
def
xAttributes
( pscope : NamespaceBinding )
: Tuple2
parse attribute and create namespace scope, metadata [41] Attributes ::= { S Name Eq AttValue } |
|
def
xCharData
: NodeSeq
'<! CharData ::= [CDATA[ ( {char} - {char}"]]>"{char} ) ']]>' see [15] |
|
def
xCharRef
( ch : Function0 , nextch : Function0 )
: java.lang.String
CharRef ::= "&#" '0'..'9' {'0'..'9'} ";" | "&#x" '0'..'9'|'A'..'F'|'a'..'f' { hexdigit } ";" see [66] |
|
def
xComment
: NodeSeq
Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-'))) '-->' see [15] |
|
def
xEQ
: scala.Unit
scan [S] '=' [S] |
|
def
xEndTag
( n : java.lang.String )
: scala.Unit
[42] '<' xmlEndTag ::= '<' '/' Name S? '>' |
|
def
xEntityValue
: java.lang.String
entity value, terminated by either ' or ". value may not contain <. AttValue ::= `'` { _ } `'` | `"` { _ } `"` |
|
def
xName
: java.lang.String
Name ::= (Letter | '_' | ':') (NameChar) see [5] of XML 1.0 specification |
|
def
xProcInstr
: NodeSeq
'<?' ProcInstr ::= Name [S ({Char} - ({Char}'>?' {Char})]'?>' see [15] |
|
def
xSpace
: scala.Unit
scan [3] S ::= (#x20 | #x9 | #xD | #xA)+ |
|
def
xSpaceOpt
: scala.Unit
skip optional space S? |
|
protected
|
def
xTag
( pscope : NamespaceBinding )
: Tuple3
parse a start or empty tag. [40] STag ::= '<' Name { S Attribute } [S] [44] EmptyElemTag ::= '<' Name { S Attribute } [S] |
def
xText
: java.lang.String
parse character data. precondition: xEmbeddedBlock == false (we are not in a scala block) |
|
def
xToken
( that : scala.Char )
: scala.Unit
munch expected XML token, report syntax error for unexpected |
|
def
xToken
( that : Seq )
: scala.Unit
|
|
def
xmlProcInstr
: MetaData
<? prolog ::= xml S ... ?> |
Def Detail |
def
appendText
( pos : scala.Int , ts : NodeBuffer , txt : java.lang.String ) : scala.Unit
def
attrDecl
: scala.Unit
def
content
( pscope : NamespaceBinding ) : NodeSeq
def
content1
( pscope : NamespaceBinding , ts : NodeBuffer ) : scala.Unit
def
document
: Document
def
element
( pscope : NamespaceBinding ) : NodeSeq
def
element1
( pscope : NamespaceBinding ) : NodeSeq
def
elementDecl
: scala.Unit
def
entityDecl
: scala.Unit
def
extSubset
: scala.Unit
def
externalID
: ExternalID
def
externalSource
( systemLiteral : java.lang.String ) : Source
def
input
: Source
def
intSubset
: scala.Unit
def
markupDecl
: scala.Unit
def
markupDecl1
: scala.Any
def
nextch
: scala.Unit
def
normalizeAttributeValue
( attval : java.lang.String ) : java.lang.String
def
notationDecl
: scala.Unit
def
parseDTD
: scala.Unit
def
pop
: scala.Unit
def
preserveWS
: scala.Boolean
def
prolog
: Tuple3
def
pubidLiteral
: java.lang.String
def
push
( entityName : java.lang.String ) : scala.Unit
def
pushExternal
( systemId : java.lang.String ) : scala.Unit
def
putChar
( c : scala.Char ) : java.lang.StringBuffer
def
reportSyntaxError
( pos : scala.Int , str : java.lang.String ) : scala.Unit
def
reportSyntaxError
( str : java.lang.String ) : scala.Unit
def
reportValidationError
( pos : scala.Int , str : java.lang.String ) : scala.Unit
def
systemLiteral
: java.lang.String
def
textDecl
: Tuple2
def
xAttributeValue
: java.lang.String
def
xAttributes
( pscope : NamespaceBinding ) : Tuple2
def
xCharData
: NodeSeq
def
xCharRef
( ch : Function0 , nextch : Function0 ) : java.lang.String
def
xComment
: NodeSeq
def
xEQ
: scala.Unit
def
xEndTag
( n : java.lang.String ) : scala.Unit
def
xEntityValue
: java.lang.String
def
xName
: java.lang.String
def
xProcInstr
: NodeSeq
def
xSpace
: scala.Unit
def
xSpaceOpt
: scala.Unit
def
xTag
( pscope : NamespaceBinding ) : Tuple3
def
xText
: java.lang.String
def
xToken
( that : scala.Char ) : scala.Unit
def
xToken
( that : Seq ) : scala.Unit
def
xmlProcInstr
: MetaData