org.sblim.wbem.xml.parser

Class XMLPullParser


public class XMLPullParser
extends java.lang.Object

XMLPullParser.java (C) Copyright IBM Corp. 2005, 2009 THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. You can obtain a current copy of the Eclipse Public License from http://www.opensource.org/licenses/eclipse-1.0.php

Field Summary

static int
ATTRIBUTE
static int
CDATA
static int
CHARACTERS
static int
COMMENT
static int
DTD
static 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

XMLPullParser(Reader in)

Method Summary

protected char
_getNextChar()
protected void
addAttribute(int begName, int lenName, int begValue, int lenValue, int hashname, int hashvalue)
void
close()
protected void
ensureCapacity()
protected String
escape(char ch)
Attributes
getAttributes()
protected int
getChar()
String
getElementName()
Vector
getElementNames()
int
getLevel()
protected int
getNextChar()
protected int
getNextCharCheckingEOF()
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(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)
String
toString()

Field Details

ATTRIBUTE

public static final int ATTRIBUTE
Field Value:
10

CDATA

public static final int CDATA
Field Value:
12

CHARACTERS

public static final int CHARACTERS
Field Value:
4

COMMENT

public static final int COMMENT
Field Value:
5

DTD

public static final int DTD
Field Value:
11

EMPTY

public static final String EMPTY

END_DOCUMENT

public static final int END_DOCUMENT
Field Value:
8

END_ELEMENT

public static final int END_ELEMENT
Field Value:
2

ENTITY_DECLARATION

public static final int ENTITY_DECLARATION
Field Value:
15

ENTITY_REFERENCE

public static final int ENTITY_REFERENCE
Field Value:
9

NAMESPACE

public static final int NAMESPACE
Field Value:
13

NOTATION_DECLARATION

public static final int NOTATION_DECLARATION
Field Value:
14

PROCESSING_INSTRUCTION

public static final int PROCESSING_INSTRUCTION
Field Value:
3

SPACE

public static final int SPACE
Field Value:
6

START_DOCUMENT

public static final int START_DOCUMENT
Field Value:
7

START_ELEMENT

public static final int START_ELEMENT
Field Value:
1

Constructor Details

XMLPullParser

public XMLPullParser(Reader in)

Method Details

_getNextChar

protected char _getNextChar()

addAttribute

protected void addAttribute(int begName,
                            int lenName,
                            int begValue,
                            int lenValue,
                            int hashname,
                            int hashvalue)

close

public void close()

ensureCapacity

protected void ensureCapacity()

escape

protected String escape(char ch)

getAttributes

public Attributes getAttributes()

getChar

protected int getChar()
            throws IOException

getElementName

public String getElementName()

getElementNames

public Vector getElementNames()

getLevel

public int getLevel()

getNextChar

protected int getNextChar()
            throws IOException

getNextCharCheckingEOF

protected int getNextCharCheckingEOF()
            throws IOException

getText

public String getText()

goBack

protected void goBack()

hasNext

public boolean hasNext()

isSpace

protected boolean isSpace(char ch)

isValidElementNameChar

protected boolean isValidElementNameChar(char ch)

isValidStartElementNameChar

protected boolean isValidStartElementNameChar(char ch)

main

public static void main(String[] args)

next

public int next()
            throws IOException

next

public static boolean next(XMLPullParser reader,
                           XMLDefaultHandlerImpl parserHdlr)
            throws Exception

parseAttribute

protected void parseAttribute(char ch)
            throws IOException

parseCDATA

protected int parseCDATA()
            throws IOException

parseComment

protected int parseComment()
            throws IOException

parseEndElement

protected void parseEndElement()
            throws IOException

parsePI

protected int parsePI()
            throws IOException

parseReference

protected int parseReference()
            throws IOException

parseStartElement

protected int parseStartElement(char ch)
            throws IOException

parseUnknown

protected void parseUnknown()
            throws IOException

reset

public void reset()

resetAttributes

protected void resetAttributes()

skipOptionalSpaces

protected char skipOptionalSpaces(char ch)
            throws IOException

skipRequiredSpaces

protected char skipRequiredSpaces(char ch)
            throws IOException

toString

public String toString()

Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.