|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.markup.parser.AbstractMarkupFilter
wicket.markup.parser.XmlPullParser
A fairly shallow markup pull or streaming parser. Parses a markup string of a given type of markup (for example, html, xml, vxml or wml) into Tag and RawMarkup tokens. IMarkupFilters may be used to handle markup specifics like identifying Wicket components or HTML which is not 100% xml compliant.
| Constructor Summary | |
XmlPullParser()
Construct. |
|
| Method Summary | |
java.lang.String |
getEncoding()
Return the encoding used while reading the markup file. |
java.lang.CharSequence |
getInputFromPositionMarker(int toPos)
Get the character sequence from the position marker to toPos. |
java.lang.CharSequence |
getInputSubsequence(int fromPos,
int toPos)
Get the character sequence in between both positions. |
java.lang.String |
getXmlDeclaration()
Return the XML declaration string, in case if found in the markup. |
MarkupElement |
nextTag()
Gets the next tag from the input string. |
void |
parse(java.lang.CharSequence string)
Parse the given string. |
void |
parse(IResourceStream resource)
Reads and parses markup from a resource such as file. |
void |
setPositionMarker()
Remember the current position in markup |
void |
setStripComments(boolean stripComments)
Set whether to strip components. |
java.lang.String |
toString()
|
| Methods inherited from class wicket.markup.parser.AbstractMarkupFilter |
getParent, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface wicket.markup.parser.IMarkupFilter |
getParent, setParent |
| Constructor Detail |
public XmlPullParser()
| Method Detail |
public java.lang.String getEncoding()
getEncoding in interface IXmlPullParserpublic java.lang.String getXmlDeclaration()
getXmlDeclaration in interface IXmlPullParserpublic final java.lang.CharSequence getInputFromPositionMarker(int toPos)
getInputFromPositionMarker in interface IXmlPullParsertoPos - index of first character not included
public final java.lang.CharSequence getInputSubsequence(int fromPos,
int toPos)
getInputSubsequence in interface IXmlPullParserfromPos - first indextoPos - second index
public final MarkupElement nextTag()
throws java.text.ParseException
nextTag in interface IMarkupFilterjava.text.ParseException
public void parse(java.lang.CharSequence string)
throws java.io.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
java.io.IOException - Error while reading the resource
ResourceStreamNotFoundException - Resource not found
public void parse(IResourceStream resource)
throws java.io.IOException,
ResourceStreamNotFoundException
parse in interface IXmlPullParserresource - The resource to read and parse
java.io.IOException
ResourceStreamNotFoundExceptionpublic final void setPositionMarker()
setPositionMarker in interface IXmlPullParserpublic void setStripComments(boolean stripComments)
setStripComments in interface IXmlPullParserstripComments - whether to strip components.public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||