|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--XmlApp | +--DtdDemo
Demonstration application showing DTD queries.
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
Field Summary |
Fields inherited from class XmlApp |
isApplet, parser |
Constructor Summary | |
DtdDemo()
|
Method Summary | |
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. |
Methods inherited from class XmlApp |
attribute, charData, endDocument, endElement, endExternalEntity, error, ignorableWhitespace, processingInstruction, resolveEntity, startElement, startExternalEntity |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DtdDemo()
Method Detail |
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
dumpNotations()
,
dumpEntities()
,
dumpElements()
public void dumpNotations()
#makeExternalIdentifiers
public void dumpEntities()
#makeLiteral
,
#makeExternalIdentifiers
public void dumpElements()
#dumpAttributes
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |