public class XmlInputReader extends InputReader
Modifier and Type | Field and Description |
---|---|
static HashMap |
entity
The table of entity values.
|
Constructor and Description |
---|
XmlInputReader(Reader reader)
Construct a XmlInputReader from a string.
|
XmlInputReader(String s)
Construct a InputReader from a string.
|
Modifier and Type | Method and Description |
---|---|
String |
nextCDATA()
Get the text in the CDATA block.
|
Object |
nextContent()
Get the next XML outer token, trimming whitespace.
|
Object |
nextEntity(char a)
Return the next entity.
|
Object |
nextMeta()
Returns the next XML meta token.
|
Object |
nextToken()
Get the next XML Token.
|
boolean |
skipPast(String to)
Skip characters until past the requested string.
|
back, error, more, next, next, nextNonSpace
public static final HashMap entity
public XmlInputReader(Reader reader)
reader
- A reader.public XmlInputReader(String s)
s
- A source string.public String nextCDATA() throws InputException
]]>
.InputException
- If the ]]>
is not found.public Object nextContent() throws InputException
InputException
public Object nextEntity(char a) throws InputException
& ' > < "
.a
- An ampersand character.InputException
- If missing ';' in XML entity.public Object nextMeta() throws InputException
< > / = ! ?
) are returned as
Character, and strings and names are returned as Boolean. We don't care
what the values actually are.InputException
- If a string is not properly closed or if the XML
is badly structured.public Object nextToken() throws InputException
/ > = ! ?
or it
may be a string wrapped in single quotes or double quotes, or it may be a
name.InputException
- If the XML is not well formed.public boolean skipPast(String to) throws InputException
to
- A string to skip past.InputException
Copyright © 2021. All rights reserved.