All Packages Class Hierarchy This Package Previous Next Index
Class org.xmlmiddleware.schemas.dtds.DTDParser
java.lang.Object
|
+----org.xmlmiddleware.schemas.dtds.DTDParser
- public class DTDParser
- extends Object
Parses an external DTD or the DTD in an XML document and creates a DTD object.
While DTDParser checks for most syntactic errors in the DTD, it does not
check for all of them. (For example, it does not check if entities are well-formed.)
Thus, results are undetermined if the DTD is not syntactically correct.
- Version:
- 2.0
- Author:
- Ronald Bourret
-
DTDParser()
- Create a new DTDParser.
-
parseExternalSubset(InputSource, Hashtable)
- Parse the DTD in an external subset.
-
parseXMLDocument(InputSource, Hashtable)
- Parse the DTD in an XML document containing an internal subset,
reference to an external subset, or both.
DTDParser
public DTDParser()
- Create a new DTDParser.
parseXMLDocument
public DTD parseXMLDocument(InputSource src,
Hashtable namespaceURIs) throws XMLMiddlewareException, MalformedURLException, IOException, EOFException
- Parse the DTD in an XML document containing an internal subset,
reference to an external subset, or both.
- Parameters:
- src - A SAX InputSource for the XML document.
- namespaceURIs - A Hashtable of keyed by prefixes used in the DTD,
mapping these to namespace URIs. May be null.
- Returns:
- The DTD object.
- Throws: XMLMiddlewareException
- Thrown if a DTD error is found.
- Throws: EOFException
- Thrown if EOF is reached prematurely.
- Throws: MalformedURLException
- Thrown if a system ID is malformed.
- Throws: IOException
- Thrown if an I/O error occurs.
parseExternalSubset
public DTD parseExternalSubset(InputSource src,
Hashtable namespaceURIs) throws XMLMiddlewareException, MalformedURLException, IOException, EOFException
- Parse the DTD in an external subset.
- Parameters:
- src - A SAX InputSource for DTD (external subset).
- namespaceURIs - A Hashtable of keyed by prefixes used in the DTD,
mapping these to namespace URIs. May be null.
- Returns:
- The DTD object.
- Throws: XMLMiddlewareException
- Thrown if a DTD error is found.
- Throws: EOFException
- Thrown if EOF is reached prematurely.
- Throws: MalformedURLException
- Thrown if a system ID is malformed.
- Throws: IOException
- Thrown if an I/O error occurs.
All Packages Class Hierarchy This Package Previous Next Index