com.conradroche.matra.dtdparser
Class DTDParser
java.lang.Object
|
+--com.conradroche.matra.dtdparser.DTDParser
- public class DTDParser
- extends Object
Class to parse a DTD resource.
Field Summary |
static String |
ATTRIBUTE_DECL
Constant to store the token identifying an
attribute declaration. |
static String |
ELEMENT_DECL
Constant to store the token identifying an
element type declaration. |
static String |
ENTITY_DECL
Constant to store the token identifying an
entity declaration. |
static String |
NOTATION_DECL
Constant to store the token identifying a
notation declaration. |
Constructor Summary |
DTDParser()
DTDParser constructor comment. |
ELEMENT_DECL
public static final String ELEMENT_DECL
- Constant to store the token identifying an
element type declaration.
ATTRIBUTE_DECL
public static final String ATTRIBUTE_DECL
- Constant to store the token identifying an
attribute declaration.
ENTITY_DECL
public static final String ENTITY_DECL
- Constant to store the token identifying an
entity declaration.
NOTATION_DECL
public static final String NOTATION_DECL
- Constant to store the token identifying a
notation declaration.
DTDParser
public DTDParser()
- DTDParser constructor comment.
getDocType
public DocType getDocType()
throws DTDException
- Returns the doctype for the parsed DTD.
- Returns:
- The doctype for the parsed DTD.
- Throws:
DTDException
- If the dtd is not completely parsed yet.
parse
public void parse(DTDSource dtdSrc)
throws DTDException
- Parses the specified DTD.
- Parameters:
dtdSrc
- The location of the DTD.- Throws:
DTDException
- If parsing of the DTD failed.
parse
public void parse(String dtdString)
throws DTDException
- Parses the specified DTD string.
- Parameters:
dtdString
- The DTD to be parsed.- Throws:
DTDException
- If parsing of the DTD failed.