XMLScanner Class
XMLScanner - XML/HTML tokenzier. Also known as XML push parser.
Item Index
Methods
this
(
XMLScanner
input
Creates new instance of XMLScanner class, and load xml file into it.
Parameters:
-
input
StreamSource stream.
Returns:
XMLScanner: New instance of XMLScanner
Properties
ATTR
Integer final
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.
Example:
<tag attr="value" >
_______________^-- happens here
CDATA
Integer final
CData parsed.
Example:
<![CDATA[ ...value... ]]>
__________________^-- happens here
DOCTYPE
Integer final
Scanner.value contains text of the doctype declaration: characters after
Example:
<!DOCTYPE ...value... >
___________________^-- happens here
EMPTY_HEAD_END
Integer final
End of head of empty element parsed
Example:
<tag ... />
_____^-- happens here
HEAD_END
Integer final
End of head of non-empty element parsed.
Example:
<tag ...
____^-- happens here
PI
Integer final
Processing instruction parsed.
Example:
<? ...value... ?>
___________^-- happens here
tag
String
Name of the tag. Valid if token is XMLScanner.HEAD, XMLScanner.TAIL or XMLScanner.HEAD_END.