Logo Search packages:      
Sourcecode: jedit version File versions  Download package

com::microstar::xml::XmlParser Class Reference

List of all members.


Detailed Description

Parse XML documents and return parse events through call-backs.

You need to define a class implementing the XmlHandler interface: an object belonging to this class will receive the callbacks for the events. (As an alternative to implementing the full XmlHandler interface, you can simply extend the HandlerBase convenience class.)

Usage (assuming that MyHandler is your implementation of the XmlHandler interface):

 XmlHandler handler = new MyHandler();
 XmlParser parser = new XmlParser();
 parser.setHandler(handler);
 try {
   parser.parse("http://www.host.com/doc.xml", null);
 } catch (Exception e) {
   [do something interesting]
 }
 
Author:
Copyright (c) 1997, 1998 by Microstar Software Ltd.

Written by David Megginson <dmeggins@microstar.com>

Version:
1.1
Deprecated:
use org.xml.sax.XMLReader

Definition at line 42 of file XmlParser.java.


Public Member Functions

Enumeration declaredAttributes (String elname)
Enumeration declaredElements ()
Enumeration declaredEntities ()
Enumeration declaredNotations ()
String getAttributeDefaultValue (String name, String aname)
int getAttributeDefaultValueType (String name, String aname)
String getAttributeEnumeration (String name, String aname)
String getAttributeExpandedValue (String name, String aname)
int getAttributeType (String name, String aname)
int getColumnNumber ()
String getElementContentModel (String name)
int getElementContentType (String name)
String getEntityNotationName (String eName)
String getEntityPublicId (String ename)
String getEntitySystemId (String ename)
int getEntityType (String ename)
String getEntityValue (String ename)
int getLineNumber ()
String getNotationPublicId (String nname)
String getNotationSystemId (String nname)
String intern (char ch[], int start, int length)
String intern (String s)
void parse (String systemId, String publicId, Reader reader) throws java.lang.Exception
void parse (String systemId, String publicId, InputStream stream, String encoding) throws java.lang.Exception
void parse (String systemId, String publicId, String encoding) throws java.lang.Exception
void setHandler (XmlHandler handler)
 XmlParser ()

Static Public Attributes

static final int ATTRIBUTE_CDATA = 1
static final int ATTRIBUTE_DEFAULT_FIXED = 4
static final int ATTRIBUTE_DEFAULT_IMPLIED = 2
static final int ATTRIBUTE_DEFAULT_REQUIRED = 3
static final int ATTRIBUTE_DEFAULT_SPECIFIED = 1
static final int ATTRIBUTE_DEFAULT_UNDECLARED = 0
static final int ATTRIBUTE_ENTITIES = 6
static final int ATTRIBUTE_ENTITY = 5
static final int ATTRIBUTE_ENUMERATED = 9
static final int ATTRIBUTE_ID = 2
static final int ATTRIBUTE_IDREF = 3
static final int ATTRIBUTE_IDREFS = 4
static final int ATTRIBUTE_NMTOKEN = 7
static final int ATTRIBUTE_NMTOKENS = 8
static final int ATTRIBUTE_NOTATION = 10
static final int ATTRIBUTE_UNDECLARED = 0
static final int CONTENT_ANY = 1
static final int CONTENT_ELEMENTS = 4
static final int CONTENT_EMPTY = 2
static final int CONTENT_MIXED = 3
static final int CONTENT_UNDECLARED = 0
static final int ENTITY_INTERNAL = 1
static final int ENTITY_NDATA = 2
static final int ENTITY_TEXT = 3
static final int ENTITY_UNDECLARED = 0

Package Functions

void checkEncoding (String encodingName, boolean ignoreEncoding) throws java.lang.Exception
void cleanupVariables ()
void copyIso8859_1ReadBuffer (int count)
void copyUcs2ReadBuffer (int count, int shift1, int shift2) throws java.lang.Exception
void copyUcs4ReadBuffer (int count, int shift1, int shift2, int shift3, int shift4) throws java.lang.Exception
void copyUtf8ReadBuffer (int count) throws java.lang.Exception
void dataBufferAppend (char ch[], int start, int length)
void dataBufferAppend (String s)
void dataBufferAppend (char c)
void dataBufferFlush () throws java.lang.Exception
void dataBufferNormalize ()
String dataBufferToString ()
void detectEncoding () throws java.lang.Exception
void encodingError (String message, int value, int offset) throws java.lang.Exception
void error (String message, char textFound, String textExpected) throws java.lang.Exception
void error (String message, String textFound, String textExpected) throws java.lang.Exception
Object extendArray (Object array, int currentSize, int requiredSize)
void filterCR ()
Object[] getAttribute (String elName, String name)
Hashtable getElementAttributes (String name)
int getNextUtf8Byte (int pos, int count) throws java.lang.Exception
void initializeVariables ()
final boolean isWhitespace (char c)
void parseAttDef (String elementName) throws java.lang.Exception
void parseAttlistDecl () throws java.lang.Exception
void parseAttribute (String name) throws java.lang.Exception
void parseCDSect () throws java.lang.Exception
void parseCharRef () throws java.lang.Exception
void parseComment () throws java.lang.Exception
void parseConditionalSect () throws java.lang.Exception
void parseContent () throws java.lang.Exception
void parseContentspec (String name) throws java.lang.Exception
void parseCp () throws java.lang.Exception
void parseDefault (String elementName, String name, int type, String enumeration) throws java.lang.Exception
void parseDoctypedecl () throws java.lang.Exception
void parseDocument () throws java.lang.Exception
void parseElement () throws java.lang.Exception
void parseElementdecl () throws java.lang.Exception
void parseElements () throws java.lang.Exception
void parseEntityDecl () throws java.lang.Exception
void parseEntityRef (boolean externalAllowed) throws java.lang.Exception
void parseEnumeration () throws java.lang.Exception
void parseEq () throws java.lang.Exception
void parseETag () throws java.lang.Exception
void parseMarkupdecl () throws java.lang.Exception
void parseMisc () throws java.lang.Exception
void parseMixed () throws java.lang.Exception
void parseNotationDecl () throws java.lang.Exception
void parseNotationType () throws java.lang.Exception
void parsePCData () throws java.lang.Exception
void parsePEReference (boolean isEntityValue) throws java.lang.Exception
void parsePI () throws java.lang.Exception
void parseProlog () throws java.lang.Exception
void parseTextDecl (boolean ignoreEncoding) throws java.lang.Exception
void parseUntil (String delim) throws java.lang.Exception
void parseWhitespace () throws java.lang.Exception
void parseXMLDecl (boolean ignoreEncoding) throws java.lang.Exception
void popInput () throws java.lang.Exception
void pushCharArray (String ename, char ch[], int start, int length) throws java.lang.Exception
void pushInput (String ename) throws java.lang.Exception
void pushString (String ename, String s) throws java.lang.Exception
void pushURL (String ename, String publicId, String systemId, Reader reader, InputStream stream, String encoding) throws java.lang.Exception
void read8bitEncodingDeclaration () throws java.lang.Exception
int readAttType () throws java.lang.Exception
char readCh () throws java.lang.Exception
void readDataChunk () throws java.lang.Exception
String[] readExternalIds (boolean inNotation) throws java.lang.Exception
String readLiteral (int flags) throws java.lang.Exception
String readNmtoken (boolean isName) throws java.lang.Exception
void require (char delim) throws java.lang.Exception
void require (String delim) throws java.lang.Exception
void requireWhitespace () throws java.lang.Exception
void setAttribute (String elName, String name, int type, String enumeration, String value, int valueType) throws java.lang.Exception
void setElement (String name, int contentType, String contentModel, Hashtable attributes) throws java.lang.Exception
void setEntity (String eName, int eClass, String pubid, String sysid, String value, String nName)
void setExternalDataEntity (String eName, String pubid, String sysid, String nName)
void setExternalTextEntity (String eName, String pubid, String sysid)
void setInternalEntity (String eName, String value)
void setNotation (String nname, String pubid, String sysid) throws java.lang.Exception
void skipUntil (String delim) throws java.lang.Exception
void skipWhitespace () throws java.lang.Exception
boolean tryEncoding (byte sig[], byte b1, byte b2)
boolean tryEncoding (byte sig[], byte b1, byte b2, byte b3, byte b4)
void tryEncodingDecl (boolean ignoreEncoding) throws java.lang.Exception
boolean tryRead (String delim) throws java.lang.Exception
boolean tryRead (char delim) throws java.lang.Exception
boolean tryWhitespace () throws java.lang.Exception
void unread (char ch[], int length) throws java.lang.Exception
void unread (char c) throws java.lang.Exception

Static Package Functions

 [static initializer]

Package Attributes

XmlHandler handler

Private Member Functions

synchronized void doParse (String systemId, String publicId, Reader reader, InputStream stream, String encoding) throws java.lang.Exception

Private Attributes

int baseEncoding
char baseInputBuffer []
int baseInputBufferLength
int baseInputBufferStart
InputStream baseInputStream
String basePublicId
Reader baseReader
String baseURI
int column
int context
int currentByteCount
String currentElement
int currentElementContent
char dataBuffer []
int dataBufferPos
Hashtable elementInfo
int encoding
Hashtable entityInfo
Stack entityStack
int errorCount
URLConnection externalEntity
Stack inputStack
InputStream is
int line
char nameBuffer []
int nameBufferPos
Hashtable notationInfo
byte rawReadBuffer []
char readBuffer []
int readBufferLength
int readBufferOverflow
int readBufferPos
Reader reader
boolean sawCR
int sourceType
Object symbolTable []
int tagAttributePos
String tagAttributes []

Static Private Attributes

static Hashtable attributeTypeHash
static final int CONTEXT_ATTRIBUTEVALUE = 3
static final int CONTEXT_DTD = 1
static final int CONTEXT_ENTITYVALUE = 2
static final int CONTEXT_NONE = 0
static int DATA_BUFFER_INITIAL = 4096
static final int ENCODING_ISO_8859_1 = 2
static final int ENCODING_UCS_2_12 = 3
static final int ENCODING_UCS_2_21 = 4
static final int ENCODING_UCS_4_1234 = 5
static final int ENCODING_UCS_4_2143 = 7
static final int ENCODING_UCS_4_3412 = 8
static final int ENCODING_UCS_4_4321 = 6
static final int ENCODING_UTF_8 = 1
static final int INPUT_BUFFER = 4
static final int INPUT_EXTERNAL = 2
static final int INPUT_INTERNAL = 1
static final int INPUT_NONE = 0
static final int INPUT_READER = 5
static final int INPUT_STREAM = 3
static final int LIT_CHAR_REF = 1
static final int LIT_ENTITY_REF = 2
static final int LIT_NORMALIZE = 8
static final int LIT_PE_REF = 4
static int NAME_BUFFER_INITIAL = 1024
static final int READ_BUFFER_MAX = 16384
static final int SYMBOL_TABLE_LENGTH = 1087
static final boolean USE_CHEATS = true

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index