public class DtdDemo extends XmlApp
Usage: java DtdDemo <url>
Or, use it as an applet, supplying the URL as the url
parameter.
Note: This does not preserve any processing instructions or parameter entities in the DTD; otherwise, produces a fully expanded and normalised version.
XmlParser
,
XmlHandler
,
XmlApp
Constructor and Description |
---|
DtdDemo() |
Modifier and Type | Method and Description |
---|---|
void |
doctypeDecl(java.lang.String name,
java.lang.String pubid,
java.lang.String sysid)
Dump the DTD.
|
void |
dumpElements()
Produce normalised declarations for all elements.
|
void |
dumpEntities()
Produce normalised declarations for all general entities.
|
void |
dumpNotations()
Produce normalised declarations for all notations.
|
void |
endDocument(int errorCount)
Print a comment showing where the DTD (if any) ends.
|
static void |
main(java.lang.String[] args)
Entry point for an application (applets enter through XmlApp.init()).
|
void |
startDocument()
Print a comment showing where the DTD (if any) begins.
|
attribute, charData, endDocument, endElement, endExternalEntity, error, ignorableWhitespace, processingInstruction, resolveEntity, startElement, startExternalEntity
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
XmlApp.init
public void startDocument()
startDocument
in interface XmlHandler
startDocument
in class XmlApp
com.Microstar.xml.XmlHandler#startDocument
public void endDocument(int errorCount)
public void doctypeDecl(java.lang.String name, java.lang.String pubid, java.lang.String sysid)
Once this event is received, we know that the DTD is completely parsed, and can use AElfred's query routines to reconstruct a normalised version of it.
doctypeDecl
in interface XmlHandler
doctypeDecl
in class XmlApp
name
- The document type name.pubid
- The public identifier, or null if unspecified.sysid
- The system identifier, or null if unspecified.dumpNotations()
,
dumpEntities()
,
dumpElements()
public void dumpNotations()
public void dumpEntities()
public void dumpElements()
dumpAttributes(java.lang.String)