Package org.sblim.wbem.xml.parser
Class XMLPullParser
- java.lang.Object
-
- org.sblim.wbem.xml.parser.XMLPullParser
-
public class XMLPullParser extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
ATTRIBUTE
static int
CDATA
static int
CHARACTERS
static int
COMMENT
static int
DTD
static java.lang.String
EMPTY
static int
END_DOCUMENT
static int
END_ELEMENT
static int
ENTITY_DECLARATION
static int
ENTITY_REFERENCE
static int
NAMESPACE
static int
NOTATION_DECLARATION
static int
PROCESSING_INSTRUCTION
static int
SPACE
static int
START_DOCUMENT
static int
START_ELEMENT
-
Constructor Summary
Constructors Constructor Description XMLPullParser(java.io.Reader in)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected char
_getNextChar()
protected void
addAttribute(int begName, int lenName, int begValue, int lenValue, int hashname, int hashvalue)
void
close()
protected void
ensureCapacity()
protected java.lang.String
escape(char ch)
org.xml.sax.Attributes
getAttributes()
protected int
getChar()
java.lang.String
getElementName()
java.util.Vector
getElementNames()
int
getLevel()
protected int
getNextChar()
protected int
getNextCharCheckingEOF()
java.lang.String
getText()
protected void
goBack()
boolean
hasNext()
protected boolean
isSpace(char ch)
protected boolean
isValidElementNameChar(char ch)
protected boolean
isValidStartElementNameChar(char ch)
static void
main(java.lang.String[] args)
int
next()
static boolean
next(XMLPullParser reader, XMLDefaultHandlerImpl parserHdlr)
protected void
parseAttribute(char ch)
protected int
parseCDATA()
protected int
parseComment()
protected void
parseEndElement()
protected int
parsePI()
protected int
parseReference()
protected int
parseStartElement(char ch)
protected void
parseUnknown()
void
reset()
protected void
resetAttributes()
protected char
skipOptionalSpaces(char ch)
protected char
skipRequiredSpaces(char ch)
java.lang.String
toString()
-
-
-
Field Detail
-
ATTRIBUTE
public static final int ATTRIBUTE
- See Also:
- Constant Field Values
-
CDATA
public static final int CDATA
- See Also:
- Constant Field Values
-
CHARACTERS
public static final int CHARACTERS
- See Also:
- Constant Field Values
-
COMMENT
public static final int COMMENT
- See Also:
- Constant Field Values
-
DTD
public static final int DTD
- See Also:
- Constant Field Values
-
EMPTY
public static final java.lang.String EMPTY
- See Also:
- Constant Field Values
-
END_DOCUMENT
public static final int END_DOCUMENT
- See Also:
- Constant Field Values
-
END_ELEMENT
public static final int END_ELEMENT
- See Also:
- Constant Field Values
-
ENTITY_DECLARATION
public static final int ENTITY_DECLARATION
- See Also:
- Constant Field Values
-
ENTITY_REFERENCE
public static final int ENTITY_REFERENCE
- See Also:
- Constant Field Values
-
NAMESPACE
public static final int NAMESPACE
- See Also:
- Constant Field Values
-
NOTATION_DECLARATION
public static final int NOTATION_DECLARATION
- See Also:
- Constant Field Values
-
PROCESSING_INSTRUCTION
public static final int PROCESSING_INSTRUCTION
- See Also:
- Constant Field Values
-
SPACE
public static final int SPACE
- See Also:
- Constant Field Values
-
START_DOCUMENT
public static final int START_DOCUMENT
- See Also:
- Constant Field Values
-
START_ELEMENT
public static final int START_ELEMENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
-
next
public static boolean next(XMLPullParser reader, XMLDefaultHandlerImpl parserHdlr) throws java.lang.Exception
- Throws:
java.lang.Exception
-
close
public void close()
-
getAttributes
public org.xml.sax.Attributes getAttributes()
-
getElementName
public java.lang.String getElementName()
-
getElementNames
public java.util.Vector getElementNames()
-
getLevel
public int getLevel()
-
getText
public java.lang.String getText()
-
hasNext
public boolean hasNext()
-
next
public int next() throws java.io.IOException
- Throws:
java.io.IOException
-
reset
public void reset()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
_getNextChar
protected char _getNextChar()
-
addAttribute
protected void addAttribute(int begName, int lenName, int begValue, int lenValue, int hashname, int hashvalue)
-
ensureCapacity
protected void ensureCapacity()
-
escape
protected java.lang.String escape(char ch)
-
getChar
protected int getChar() throws java.io.IOException
- Throws:
java.io.IOException
-
getNextChar
protected int getNextChar() throws java.io.IOException
- Throws:
java.io.IOException
-
getNextCharCheckingEOF
protected int getNextCharCheckingEOF() throws java.io.IOException
- Throws:
java.io.IOException
-
goBack
protected void goBack()
-
isSpace
protected boolean isSpace(char ch)
-
isValidElementNameChar
protected boolean isValidElementNameChar(char ch)
-
isValidStartElementNameChar
protected boolean isValidStartElementNameChar(char ch)
-
parseAttribute
protected void parseAttribute(char ch) throws java.io.IOException
- Throws:
java.io.IOException
-
parseCDATA
protected int parseCDATA() throws java.io.IOException
- Throws:
java.io.IOException
-
parseComment
protected int parseComment() throws java.io.IOException
- Throws:
java.io.IOException
-
parseEndElement
protected void parseEndElement() throws java.io.IOException
- Throws:
java.io.IOException
-
parsePI
protected int parsePI() throws java.io.IOException
- Throws:
java.io.IOException
-
parseReference
protected int parseReference() throws java.io.IOException
- Throws:
java.io.IOException
-
parseStartElement
protected int parseStartElement(char ch) throws java.io.IOException
- Throws:
java.io.IOException
-
parseUnknown
protected void parseUnknown() throws java.io.IOException
- Throws:
java.io.IOException
-
resetAttributes
protected void resetAttributes()
-
skipOptionalSpaces
protected char skipOptionalSpaces(char ch) throws java.io.IOException
- Throws:
java.io.IOException
-
skipRequiredSpaces
protected char skipRequiredSpaces(char ch) throws java.io.IOException
- Throws:
java.io.IOException
-
-