All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.xml.parser.Parser

java.lang.Object
   |
   +----com.ibm.xml.parser.Parser

public class Parser
extends Object
Version:
19980206

Constructor Index

 o Parser(String)
Make parser instance with default ErrorListener and StreamProducer.
 o Parser(String, ErrorListener, StreamProducer)
Make parser instance with specified ErrorListener and StreamProducer.

Method Index

 o addElementHandler(ElementHandler)
Add ElementHandler for all Element.
 o addElementHandler(ElementHandler, String)
Add ElementHandler for specified Element.
 o addNoRequiredAttributeHandler(NoRequiredAttributeHandler)
Add NoRequiredAttributeHandler.
 o addPIHandler(PIHandler)
Add PIHandler.
 o addPreRootHandler(PreRootHandler)
Add PreRootHandler.
 o getInputStream(String)
Create InputStream by StreamProducer.
 o getInputStream(String, String, String)
Create InputStream by StreamProducer.
 o getNumberOfErrors()
Get a number of errors.
 o readDTDStream(InputStream)
Make DTD instance from InputStream.
 o readStream(InputStream)
Parse.
 o setAllowJavaEncodingName(boolean)
Set if the parser recognizes not only MIME charsets but also Java encoding names.
 o setDebugPrintName(boolean)
Print parsing Name token to standard-error.
 o setElementFactory(ElementFactory)
Set ElementFactory.
 o setErrorNoByteMark(boolean)
Set if the parser treats an input without byte order mark as error.
 o setKeepComment(boolean)
Set if the parser make Comment instance.
 o setPreserveSpace(boolean)
Set if the parser preserves spaces in texts.
 o setProcessNamespace(boolean)
Enable namespace feature.
 o setStartTagHandler(StartTagHandler)
 o setWarningNoDoctypeDecl(boolean)
Set if the parser warns the document has no `<!DOCTYPE ...>'.
 o setWarningNoXMLDecl(boolean)
Set if the parser warns the document has no `<?XML ...?>'.
 o setWarningRedefinedEntity(boolean)
Set if the parser warns redefinition of entity.

Constructors

 o Parser
 public Parser(String fname)
Make parser instance with default ErrorListener and StreamProducer.

 o Parser
 public Parser(String fname,
               ErrorListener el,
               StreamProducer sp)
Make parser instance with specified ErrorListener and StreamProducer.

Parameters:
el - You can specify null when you use default ErrorListener.
sp - You can specify null when you use default StreamProducer.

Methods

 o setElementFactory
 public void setElementFactory(ElementFactory ef)
Set ElementFactory.

 o getInputStream
 public InputStream getInputStream(String name,
                                   String pubid,
                                   String sysid) throws IOException
Create InputStream by StreamProducer.

See Also:
getInputStream
 o getInputStream
 public InputStream getInputStream(String name) throws IOException
Create InputStream by StreamProducer.

Parameters:
name - URL string
See Also:
getInputStream
 o setStartTagHandler
 public void setStartTagHandler(StartTagHandler sth)
 o addPreRootHandler
 public void addPreRootHandler(PreRootHandler prh)
Add PreRootHandler.

 o addPIHandler
 public void addPIHandler(PIHandler ph)
Add PIHandler.

See Also:
PIHandler
 o addElementHandler
 public void addElementHandler(ElementHandler eh)
Add ElementHandler for all Element.

See Also:
ElementHandler
 o addElementHandler
 public void addElementHandler(ElementHandler eh,
                               String ename)
Add ElementHandler for specified Element.

See Also:
ElementHandler
 o addNoRequiredAttributeHandler
 public void addNoRequiredAttributeHandler(NoRequiredAttributeHandler nrah)
Add NoRequiredAttributeHandler. Handlers are called when an element has no `#REQUIRED' attribute.

See Also:
handleNoRequiredAttribute
 o getNumberOfErrors
 public int getNumberOfErrors()
Get a number of errors.

 o setKeepComment
 public void setKeepComment(boolean f)
Set if the parser make Comment instance. Default is false.

 o setProcessNamespace
 public void setProcessNamespace(boolean f)
Enable namespace feature.

 o setErrorNoByteMark
 public void setErrorNoByteMark(boolean f)
Set if the parser treats an input without byte order mark as error. Default is true.

 o setAllowJavaEncodingName
 public void setAllowJavaEncodingName(boolean f)
Set if the parser recognizes not only MIME charsets but also Java encoding names. Default is false.

 o setPreserveSpace
 public void setPreserveSpace(boolean f)
Set if the parser preserves spaces in texts. Default is false.

 o setWarningRedefinedEntity
 public void setWarningRedefinedEntity(boolean f)
Set if the parser warns redefinition of entity. Default is true.

 o setWarningNoXMLDecl
 public void setWarningNoXMLDecl(boolean f)
Set if the parser warns the document has no `<?XML ...?>'.

 o setWarningNoDoctypeDecl
 public void setWarningNoDoctypeDecl(boolean f)
Set if the parser warns the document has no `<!DOCTYPE ...>'.

 o setDebugPrintName
 public void setDebugPrintName(boolean f)
Print parsing Name token to standard-error.

 o readStream
 public TXDocument readStream(InputStream is)
Parse.

 o readDTDStream
 public DTD readDTDStream(InputStream is) throws IOException
Make DTD instance from InputStream. This DTD is `External subset'.


All Packages  Class Hierarchy  This Package  Previous  Next  Index