Class XMLPullParser
java.lang.Object
org.sblim.cimclient.internal.pullparser.XMLPullParser
Class XMLPullParser is responsible for XML parsing.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intATTRIBUTEstatic final intCDATAstatic final intCHARACTERSstatic final intCOMMENTstatic final intDTDstatic final StringEMPTYstatic final intEND_DOCUMENTstatic final intEND_ELEMENTstatic final intENTITY_DECLARATIONstatic final intENTITY_REFERENCEstatic final intNAMESPACEstatic final intNOTATION_DECLARATIONstatic final intPROCESSING_INSTRUCTIONstatic final intSPACEstatic final intSTART_DOCUMENTstatic final intSTART_ELEMENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected charprotected voidaddAttribute(int begName, int lenName, int begValue, int lenValue) voidclose()closeprotected voidprotected Stringescape(char ch) getAttributesprotected intgetChar()getElementNamegetElementNamesintgetLevel()getLevelprotected intprotected intgetText()getTextprotected voidgoBack()booleanhasNext()hasNextprotected booleanisSpace(char ch) protected booleanisValidElementNameChar(char ch) protected booleanisValidStartElementNameChar(char ch) static voidmainintnext()nextstatic booleannext(XMLPullParser reader, XMLDefaultHandlerImpl parserHdlr) nextprotected voidparseAttribute(char ch) protected intprotected intprotected voidprotected intparsePI()protected intprotected intparseStartElement(char ch) protected voidvoidreset()resetprotected voidprotected charskipOptionalSpaces(char ch) protected charskipRequiredSpaces(char ch) toString()
-
Field Details
-
ATTRIBUTE
public static final int ATTRIBUTEATTRIBUTE- See Also:
-
CDATA
public static final int CDATACDATA- See Also:
-
CHARACTERS
public static final int CHARACTERSCHARACTERS- See Also:
-
COMMENT
public static final int COMMENTCOMMENT- See Also:
-
DTD
public static final int DTDDTD- See Also:
-
EMPTY
-
END_DOCUMENT
public static final int END_DOCUMENTEND_DOCUMENT- See Also:
-
END_ELEMENT
public static final int END_ELEMENTEND_ELEMENT- See Also:
-
ENTITY_DECLARATION
public static final int ENTITY_DECLARATIONENTITY_DECLARATION- See Also:
-
ENTITY_REFERENCE
public static final int ENTITY_REFERENCEENTITY_REFERENCE- See Also:
-
NAMESPACE
public static final int NAMESPACENAMESPACE- See Also:
-
NOTATION_DECLARATION
public static final int NOTATION_DECLARATIONNOTATION_DECLARATION- See Also:
-
PROCESSING_INSTRUCTION
public static final int PROCESSING_INSTRUCTIONPROCESSING_INSTRUCTION- See Also:
-
SPACE
public static final int SPACESPACE- See Also:
-
START_DOCUMENT
public static final int START_DOCUMENTSTART_DOCUMENT- See Also:
-
START_ELEMENT
public static final int START_ELEMENTSTART_ELEMENT- See Also:
-
-
Constructor Details
-
XMLPullParser
-
-
Method Details
-
main
-
next
next- Parameters:
reader-parserHdlr-- Returns:
- boolean
- Throws:
Exception
-
close
-
getAttributes
-
getElementName
-
getElementNames
-
getLevel
public int getLevel()getLevel- Returns:
- int
-
getText
-
hasNext
public boolean hasNext()hasNext- Returns:
- boolean
-
next
-
reset
public void reset()reset -
toString
-
_getNextChar
protected char _getNextChar() -
addAttribute
protected void addAttribute(int begName, int lenName, int begValue, int lenValue) -
ensureCapacity
protected void ensureCapacity() -
escape
-
getChar
- Throws:
IOException
-
getNextChar
- Throws:
IOException
-
getNextCharCheckingEOF
- Throws:
IOException
-
goBack
protected void goBack() -
isSpace
protected boolean isSpace(char ch) -
isValidElementNameChar
protected boolean isValidElementNameChar(char ch) -
isValidStartElementNameChar
protected boolean isValidStartElementNameChar(char ch) -
parseAttribute
- Throws:
IOException
-
parseCDATA
- Throws:
IOException
-
parseComment
- Throws:
IOException
-
parseEndElement
- Throws:
IOException
-
parsePI
- Throws:
IOException
-
parseReference
- Throws:
IOException
-
parseStartElement
- Throws:
IOException
-
parseUnknown
- Throws:
IOException
-
resetAttributes
protected void resetAttributes() -
skipOptionalSpaces
- Throws:
IOException
-
skipRequiredSpaces
- Throws:
IOException
-