|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectXmlApp
DtdDemo
public class 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.ExceptionXmlApp.initpublic void startDocument()
startDocument in interface XmlHandlerstartDocument in class XmlAppcom.Microstar.xml.XmlHandler#startDocumentpublic 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 XmlHandlerdoctypeDecl in class XmlAppname - 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()
makeExternalIdentifiers(java.lang.String, java.lang.String)public void dumpEntities()
makeLiteral(java.lang.String),
makeExternalIdentifiers(java.lang.String, java.lang.String)public void dumpElements()
dumpAttributes(java.lang.String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||