public final class XmlPullParser extends Object implements IXmlPullParser
IXmlPullParser.HttpTagType| Modifier and Type | Field and Description |
|---|---|
static String |
SCRIPT |
static String |
STYLE |
| Constructor and Description |
|---|
XmlPullParser()
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
CharSequence |
getDoctype()
Gets the <!DOCTYPE ...> tag if found in the markup
|
XmlTag |
getElement() |
String |
getEncoding()
Return the encoding applied while reading the markup resource.
|
CharSequence |
getInput(int fromPos,
int toPos)
Wicket dissects the markup into Wicket relevant tags and raw markup, which is not further
analyzed by Wicket.
|
CharSequence |
getInputFromPositionMarker(int toPos)
Wicket dissects the markup into Wicket relevant tags and raw markup, which is not further
analyzed by Wicket.
|
CharSequence |
getString() |
IXmlPullParser.HttpTagType |
next()
Move to the next XML element
|
XmlTag |
nextTag() |
void |
parse(CharSequence string)
Parse the given string.
|
void |
parse(InputStream in)
Reads and parses markup from an input stream, using UTF-8 encoding by default when not
specified in XML declaration.
|
void |
parse(InputStream inputStream,
String encoding)
Reads and parses markup from an input stream.
|
void |
setPositionMarker()
Set the position marker of the markup at the current position.
|
void |
setPositionMarker(int pos)
Set the position marker of the markup
|
protected void |
specialTagHandling(String tagText,
int openBracketIndex,
int closeBracketIndex)
Handle special tags like or or
|
String |
toString() |
public static final String STYLE
public static final String SCRIPT
public final String getEncoding()
IXmlPullParsergetEncoding in interface IXmlPullParserpublic final CharSequence getDoctype()
IXmlPullParsergetDoctype in interface IXmlPullParserpublic final CharSequence getInputFromPositionMarker(int toPos)
IXmlPullParsergetInputFromPositionMarker in interface IXmlPullParsertoPos - To positionpublic final CharSequence getInput(int fromPos, int toPos)
IXmlPullParsergetInput in interface IXmlPullParserfromPos - From positiontoPos - To positionpublic final IXmlPullParser.HttpTagType next() throws ParseException
IXmlPullParsernext in interface IXmlPullParserParseExceptionprotected void specialTagHandling(String tagText, int openBracketIndex, int closeBracketIndex) throws ParseException
tagText - openBracketIndex - closeBracketIndex - ParseExceptionpublic final XmlTag getElement()
getElement in interface IXmlPullParserpublic final CharSequence getString()
getString in interface IXmlPullParserpublic final XmlTag nextTag() throws ParseException
ParseExceptionpublic void parse(CharSequence string) throws IOException
Note: xml character encoding is NOT applied. It is assumed the input provided does have the correct encoding already.
parse in interface IXmlPullParserstring - The input stringIOException - Error while reading the resourcepublic void parse(InputStream in) throws IOException
parse in interface IXmlPullParserin - The input stream to read and parseIOException#parse(InputStream, String)}public void parse(InputStream inputStream, String encoding) throws IOException
Note: The input is closed after parsing.
parse in interface IXmlPullParserinputStream - The input stream to read and parseencoding - The default character encoding of the inputIOExceptionpublic final void setPositionMarker()
IXmlPullParsersetPositionMarker in interface IXmlPullParserpublic final void setPositionMarker(int pos)
IXmlPullParsersetPositionMarker in interface IXmlPullParserCopyright © 2006–2021 Apache Software Foundation. All rights reserved.