|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.markup.parser.XmlPullParser
public final class XmlPullParser
A fairly shallow markup pull parser which parses a markup string of a given type of markup (for example, html, xml, vxml or wml) into ComponentTag and RawMarkup tokens.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.wicket.markup.parser.IXmlPullParser |
|---|
IXmlPullParser.HttpTagType |
| Field Summary | |
|---|---|
static String |
SCRIPT
|
static String |
STYLE
|
| Constructor Summary | |
|---|---|
XmlPullParser()
Construct. |
|
| Method Summary | |
|---|---|
CharSequence |
getDoctype()
Gets the <! |
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 |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String STYLE
public static final String SCRIPT
| Constructor Detail |
|---|
public XmlPullParser()
| Method Detail |
|---|
public final String getEncoding()
IXmlPullParser
getEncoding in interface IXmlPullParserpublic final CharSequence getDoctype()
IXmlPullParser
getDoctype in interface IXmlPullParserpublic final CharSequence getInputFromPositionMarker(int toPos)
IXmlPullParser
getInputFromPositionMarker in interface IXmlPullParsertoPos - To position
public final CharSequence getInput(int fromPos,
int toPos)
IXmlPullParser
getInput in interface IXmlPullParserfromPos - From positiontoPos - To position
public final IXmlPullParser.HttpTagType next()
throws ParseException
IXmlPullParser
next in interface IXmlPullParserParseException
protected 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 IXmlPullParser
public final XmlTag nextTag()
throws ParseException
ParseException
public void parse(CharSequence string)
throws IOException,
ResourceStreamNotFoundException
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 string
IOException - Error while reading the resource
ResourceStreamNotFoundException - Resource not found
public void parse(InputStream in)
throws IOException,
ResourceStreamNotFoundException
parse in interface IXmlPullParserin - The input stream to read and parse
IOException
ResourceStreamNotFoundException
public void parse(InputStream inputStream,
String encoding)
throws IOException
parse in interface IXmlPullParserinputStream - The input stream to read and parseencoding - The default character encoding of the input
IOExceptionpublic final void setPositionMarker()
IXmlPullParser
setPositionMarker in interface IXmlPullParserpublic final void setPositionMarker(int pos)
IXmlPullParser
setPositionMarker in interface IXmlPullParserpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||