public abstract class XmlParser<M> extends Object
XmlPullParser| Constructor and Description |
|---|
XmlParser() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkStartFile(org.xmlpull.v1.XmlPullParser parser,
String requiredTag,
String errorMessage)
Check that parser starts with the given tag.
|
M |
getModel(File file) |
protected abstract M |
parseModel(org.xmlpull.v1.XmlPullParser parser) |
boolean |
parserEqual(org.xmlpull.v1.XmlPullParser parser,
String name) |
protected boolean |
testCurrentEndTag(org.xmlpull.v1.XmlPullParser parser,
String requiredTag) |
protected boolean |
testCurrentStartTag(org.xmlpull.v1.XmlPullParser parser,
String requiredTag) |
protected boolean |
testNextEndTag(org.xmlpull.v1.XmlPullParser parser,
String requiredTag) |
protected boolean |
testNextStartTag(org.xmlpull.v1.XmlPullParser parser,
String requiredTag) |
public M getModel(File file) throws org.xmlpull.v1.XmlPullParserException, IOException, ParseException
org.xmlpull.v1.XmlPullParserExceptionIOExceptionParseExceptionprotected abstract M parseModel(org.xmlpull.v1.XmlPullParser parser) throws IOException, org.xmlpull.v1.XmlPullParserException, ParseException
IOExceptionorg.xmlpull.v1.XmlPullParserExceptionParseExceptionpublic boolean parserEqual(org.xmlpull.v1.XmlPullParser parser,
String name)
protected void checkStartFile(org.xmlpull.v1.XmlPullParser parser,
String requiredTag,
String errorMessage)
throws IOException,
org.xmlpull.v1.XmlPullParserException
parser - xpp parser usedrequiredTag - required first tagerrorMessage - error message to send if required tag was not foundIOExceptionorg.xmlpull.v1.XmlPullParserExceptionprotected boolean testNextStartTag(org.xmlpull.v1.XmlPullParser parser,
String requiredTag)
throws IOException,
org.xmlpull.v1.XmlPullParserException
IOExceptionorg.xmlpull.v1.XmlPullParserExceptionprotected boolean testNextEndTag(org.xmlpull.v1.XmlPullParser parser,
String requiredTag)
throws IOException,
org.xmlpull.v1.XmlPullParserException
IOExceptionorg.xmlpull.v1.XmlPullParserExceptionprotected boolean testCurrentEndTag(org.xmlpull.v1.XmlPullParser parser,
String requiredTag)
throws IOException,
org.xmlpull.v1.XmlPullParserException
IOExceptionorg.xmlpull.v1.XmlPullParserExceptionprotected boolean testCurrentStartTag(org.xmlpull.v1.XmlPullParser parser,
String requiredTag)
throws IOException,
org.xmlpull.v1.XmlPullParserException
IOExceptionorg.xmlpull.v1.XmlPullParserExceptionCopyright © 2011–2014 Code Lutin. All rights reserved.