in scala.xml.parsing
trait MarkupParser

`abstract trait` MarkupParser
  `extends` java.lang.Object
  `with` scala.xml.parsing.TokenTests
  `with` scala.ScalaObject

  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.

Author:
  Burak Emir
Version:
  1.0

Direct Known Subclasses:
  Parser, ConstructingParser

Val Summary
`protected` | `val` cbuf : scala.compat.StringBuilder character buffer, for names
`abstract` | `val` input : scala.io.Source
`abstract` | `val` preserveWS : scala.Boolean

Var Summary
| `var` ch : scala.Char holds the next character
| `var` curInput : scala.io.Source
`protected` | `var` doc : scala.xml.Document
| `var` dtd : scala.xml.dtd.DTD
| `var` eof : scala.Boolean
| `var` extIndex : scala.Int
| `var` inpStack : scala.List[scala.io.Source] stack of inputs
| `var` pos : scala.Int holds the position in the source file
| `var` tmppos : scala.Int holds temporary values of pos

Def Summary
| `def` appendText (pos: scala.Int, ts: scala.xml.NodeBuffer, txt: java.lang.String) : scala.Unit
| `def` attrDecl : scala.Unit <! attlist := ATTLIST
| `def` content (pscope: scala.xml.NamespaceBinding) : scala.xml.NodeSeq content1 ::= '<' content1 | '&' charref ...
| `def` content1 (pscope: scala.xml.NamespaceBinding, ts: scala.xml.NodeBuffer) : scala.Unit '<' content1 ::= ...
| `def` document : scala.xml.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: scala.xml.NamespaceBinding) : scala.xml.NodeSeq
| `def` element1 (pscope: scala.xml.NamespaceBinding) : scala.xml.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 : scala.xml.dtd.ExternalID externalID ::= SYSTEM S syslit PUBLIC S pubid S syslit
`abstract` | `def` externalSource (systemLiteral: java.lang.String) : scala.io.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` prolog : scala.Tuple3[scala.Option[java.lang.String], scala.Option[java.lang.String], scala.Option[scala.Boolean]] <? 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) : scala.compat.StringBuilder 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 : scala.Tuple2[scala.Option[java.lang.String], scala.Option[java.lang.String]] prolog, but without standalone
| `def` xAttributeValue : java.lang.String attribute value, terminated by either ' or ". value may not contain <. AttValue ::= `'` { _ } `'` | `"` { _ } `"`
| `def` xAttributes (pscope: scala.xml.NamespaceBinding) : scala.Tuple2[scala.xml.MetaData, scala.xml.NamespaceBinding] parse attribute and create namespace scope, metadata [41] Attributes ::= { S Name Eq AttValue }
| `def` xCharData : scala.xml.NodeSeq '<! CharData ::= [CDATA[ ( {char} - {char}"]]>"{char} ) ']]>' see [15]
| `def` xCharRef (ch: scala.Function0[scala.Char], nextch: scala.Function0[scala.Unit]) : java.lang.String CharRef ::= "&#" '0'..'9' {'0'..'9'} ";" | "&#x" '0'..'9'|'A'..'F'|'a'..'f' { hexdigit } ";" see [66]
| `def` xComment : scala.xml.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 : scala.xml.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: scala.xml.NamespaceBinding) : scala.Tuple3[java.lang.String, scala.xml.MetaData, scala.xml.NamespaceBinding] 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: scala.Seq[scala.Char]) : scala.Unit
| `def` xmlProcInstr : scala.xml.MetaData <? prolog ::= xml S ... ?>

Val Detail

`protected val` cbuf : scala.compat.StringBuilder

  character buffer, for names

`abstract val` input : scala.io.Source

`abstract val` preserveWS : scala.Boolean

Var Detail

`var` ch : scala.Char

  holds the next character

`var` curInput : scala.io.Source

`protected var` doc : scala.xml.Document

`var` dtd : scala.xml.dtd.DTD

`var` eof : scala.Boolean

`var` extIndex : scala.Int

`var` inpStack : scala.List[scala.io.Source]

  stack of inputs

`var` pos : scala.Int

  holds the position in the source file

`var` tmppos : scala.Int

  holds temporary values of pos

Def Detail

`def` appendText (pos: scala.Int, ts: scala.xml.NodeBuffer, txt: java.lang.String): scala.Unit

`def` attrDecl : scala.Unit

  <! attlist := ATTLIST

`def` content (pscope: scala.xml.NamespaceBinding): scala.xml.NodeSeq

  content1 ::= '<' content1 | '&' charref ...

`def` content1 (pscope: scala.xml.NamespaceBinding, ts: scala.xml.NodeBuffer): scala.Unit

  '<' content1 ::= ...

`def` document : scala.xml.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: scala.xml.NamespaceBinding): scala.xml.NodeSeq

`def` element1 (pscope: scala.xml.NamespaceBinding): scala.xml.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 : scala.xml.dtd.ExternalID

  externalID ::= SYSTEM S syslit PUBLIC S pubid S syslit

`abstract def` externalSource (systemLiteral: java.lang.String): scala.io.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` prolog : scala.Tuple3[scala.Option[java.lang.String], scala.Option[java.lang.String], scala.Option[scala.Boolean]]

  <? 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): scala.compat.StringBuilder

  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 : scala.Tuple2[scala.Option[java.lang.String], scala.Option[java.lang.String]]

  prolog, but without standalone

`def` xAttributeValue : java.lang.String

  attribute value, terminated by either ' or ". value may not contain <. AttValue ::= `'` { _ } `'` | `"` { _ } `"`

`def` xAttributes (pscope: scala.xml.NamespaceBinding): scala.Tuple2[scala.xml.MetaData, scala.xml.NamespaceBinding]

  parse attribute and create namespace scope, metadata [41] Attributes ::= { S Name Eq AttValue }

`def` xCharData : scala.xml.NodeSeq

  '<! CharData ::= [CDATA[ ( {char} - {char}"]]>"{char} ) ']]>' see [15]

`def` xCharRef (ch: scala.Function0[scala.Char], nextch: scala.Function0[scala.Unit]): java.lang.String

  CharRef ::= "&#" '0'..'9' {'0'..'9'} ";" | "&#x" '0'..'9'|'A'..'F'|'a'..'f' { hexdigit } ";" see [66]

`def` xComment : scala.xml.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 : scala.xml.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: scala.xml.NamespaceBinding): scala.Tuple3[java.lang.String, scala.xml.MetaData, scala.xml.NamespaceBinding]

  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: scala.Seq[scala.Char]): scala.Unit

`def` xmlProcInstr : scala.xml.MetaData

  <? prolog ::= xml S ... ?>