|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 <!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()
|
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 IXmlPullParser
public final CharSequence getDoctype()
IXmlPullParser
getDoctype
in interface IXmlPullParser
public final CharSequence getInputFromPositionMarker(int toPos)
IXmlPullParser
getInputFromPositionMarker
in interface IXmlPullParser
toPos
- To position
public final CharSequence getInput(int fromPos, int toPos)
IXmlPullParser
getInput
in interface IXmlPullParser
fromPos
- From positiontoPos
- To position
public final IXmlPullParser.HttpTagType next() throws ParseException
IXmlPullParser
next
in interface IXmlPullParser
ParseException
protected void specialTagHandling(String tagText, int openBracketIndex, int closeBracketIndex) throws ParseException
tagText
- openBracketIndex
- closeBracketIndex
-
ParseException
public final XmlTag getElement()
getElement
in interface IXmlPullParser
public final CharSequence getString()
getString
in interface IXmlPullParser
public final XmlTag nextTag() throws ParseException
ParseException
public 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 IXmlPullParser
string
- The input string
IOException
- Error while reading the resourcepublic void parse(InputStream in) throws IOException
parse
in interface IXmlPullParser
in
- The input stream to read and parse
IOException
public void parse(InputStream inputStream, String encoding) throws IOException
parse
in interface IXmlPullParser
inputStream
- The input stream to read and parseencoding
- The default character encoding of the input
IOException
public final void setPositionMarker()
IXmlPullParser
setPositionMarker
in interface IXmlPullParser
public final void setPositionMarker(int pos)
IXmlPullParser
setPositionMarker
in interface IXmlPullParser
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |