Developer   API   Files and Databases   XMLScanner

XMLScanner(native)

XMLScanner - XML/HTML tokenzier. Also known as XML push parser.

Properties

  • ATTR : Integer
    Attribute can be with or without (html style) value. scanner.attribute is the name of attribute and scanner.value - is a value of attribute. attribute parsed
  • attribute : String
    Name of the attribute. Valid if token == XMLScanner.ATTR
  • CDATA : Integer
    CData parsed
  • DOCTYPE : Integer
    Scanner.value contains text of the doctype declaration: characters after ' doctype declaration parsed
  • EMPTY_HEAD_END : Integer
    End of head of empty element parsed
  • EOF : Integer
    End of stream reached
  • ERROR : Integer
    Error in markup of input stream
  • HEAD : Integer
    Head of the element parsed
  • HEAD_END : Integer
    End of head of non-empty element parsed:
  • lineNo : Integer
    Reports current line number in input stream.
  • PI : Integer
    Scanner.value contains text of the instruction. processing instruction parsed
  • tag : T:String
    Name of the tag. Valid if token is XMLScanner.HEAD, XMLScanner.TAIL or XMLScanner.HEAD_END.
  • TAIL : Integer
    Tail of the non-empty element parsed
  • value : T:String
    Text of attribute value, text, cdata or pi.
  • WORD : Integer
    Space sequence parsed.
  • WORD : Integer
    Sequence of non-space characters parsed

Methods

  • stepBack() : Integer
    Pushes back current token so next invocation of token() will return it.
  • this(input) : XMLScanner
    Creates new instance of XMLScanner class, and load xml file into it.
  • token() : Integer
    Returns one of constants above.