Class XmlParser


  • final class XmlParser
    extends java.lang.Object
    Parse XML documents and return parse events through call-backs. Use the SAXDriver class as your entry point, as all internal parser interfaces are subject to change.
    Version:
    $Date: 2000/05/29 12:10:24 $
    Author:
    Written by David Megginson <dmeggins@microstar.com> (version 1.2a with bugfixes), Updated by David Brownell <david-b@pacbell.net>
    See Also:
    SAXDriver
    • Constructor Summary

      Constructors 
      Constructor Description
      XmlParser()
      Construct a new parser with no associated handler.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Enumeration declaredAttributes​(java.lang.String elname)
      Get the declared attributes for an element type.
      java.util.Enumeration declaredElements()
      Get the declared elements for an XML document.
      java.util.Enumeration declaredEntities()
      Get declared entities.
      java.util.Enumeration declaredNotations()
      Get declared notations.
      (package private) void doParse​(java.lang.String systemId, java.lang.String publicId, java.io.Reader reader, java.io.InputStream stream, java.lang.String encoding)
      Parse an XML document from the character stream, byte stream, or URI that you provide (in that order of preference).
      java.lang.String getAttributeDefaultValue​(java.lang.String name, java.lang.String aname)
      Retrieve the default value of a declared attribute.
      int getAttributeDefaultValueType​(java.lang.String name, java.lang.String aname)
      Retrieve the default value type of a declared attribute.
      java.lang.String getAttributeEnumeration​(java.lang.String name, java.lang.String aname)
      Retrieve the allowed values for an enumerated attribute type.
      java.lang.String getAttributeExpandedValue​(java.lang.String name, java.lang.String aname)
      Retrieve the expanded value of a declared attribute.
      int getAttributeType​(java.lang.String name, java.lang.String aname)
      Retrieve the declared type of an attribute.
      int getColumnNumber()
      Return the current column number.
      java.lang.String getElementContentModel​(java.lang.String name)
      Look up the content model of an element.
      int getElementContentType​(java.lang.String name)
      Look up the content type of an element.
      java.lang.String getEntityNotationName​(java.lang.String eName)
      Get the notation name associated with an NDATA entity.
      java.lang.String getEntityPublicId​(java.lang.String ename)
      Return an external entity's public identifier, if any.
      java.lang.String getEntitySystemId​(java.lang.String ename)
      Return an external entity's system identifier.
      int getEntityType​(java.lang.String ename)
      Find the type of an entity.
      java.lang.String getEntityValue​(java.lang.String ename)
      Return the value of an internal entity.
      int getLineNumber()
      Return the current line number.
      java.lang.String getNotationPublicId​(java.lang.String nname)
      Look up the public identifier for a notation.
      java.lang.String getNotationSystemId​(java.lang.String nname)
      Look up the system identifier for a notation.
      java.lang.String intern​(char[] ch, int start, int length)
      Create an interned string from a character array.
      (package private) void setHandler​(SAXDriver handler)
      Set the handler that will receive parsing events.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait