|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectXmlApp
EventDemo
public class EventDemo
Demonstration application showing ?lfred's event stream.
Usage: java EventDemo <url>
Or, use it as an applet, supplying the URL as the url
parameter.
XmlParser,
XmlHandler,
XmlApp| Field Summary |
|---|
| Fields inherited from class XmlApp |
|---|
isApplet, parser |
| Constructor Summary | |
|---|---|
EventDemo()
|
|
| Method Summary | |
|---|---|
void |
attribute(java.lang.String name,
java.lang.String value,
boolean isSpecified)
Handle an attribute value assignment by printing an event. |
void |
charData(char[] ch,
int start,
int length)
Handle character data by printing an event. |
void |
doctypeDecl(java.lang.String name,
java.lang.String pubid,
java.lang.String sysid)
Handle a DOCTYPE declaration by printing an event. |
void |
endDocument()
Handle the end of the document by printing an event. |
void |
endElement(java.lang.String name)
Handle the end of an element by printing an event. |
void |
endExternalEntity(java.lang.String systemId)
End an external entity. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Handle ignorable whitespace by printing an event. |
static void |
main(java.lang.String[] args)
Entry point for an application. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Handle a processing instruction by printing an event. |
java.lang.Object |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Resolve an entity and print an event. |
void |
startDocument()
Handle the start of the document by printing an event. |
void |
startElement(java.lang.String name)
Handle the start of an element by printing an event. |
void |
startExternalEntity(java.lang.String systemId)
Begin an external entity. |
| Methods inherited from class XmlApp |
|---|
error |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventDemo()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
public java.lang.Object resolveEntity(java.lang.String publicId,
java.lang.String systemId)
resolveEntity in interface XmlHandlerresolveEntity in class XmlApppublicId - The public identifier, or null if none was supplied.systemId - The system identifier.
XmlHandler.resolveEntity(java.lang.String, java.lang.String)public void startExternalEntity(java.lang.String systemId)
XmlHandlerÆlfred will call this method at the beginning of each external entity, including the top-level document entity and the external DTD subset (if any).
If necessary, you can use this method to track the location of the current entity so that you can resolve relative URIs correctly.
startExternalEntity in interface XmlHandlerstartExternalEntity in class XmlAppsystemId - The URI of the external entity that is starting.XmlHandler.endExternalEntity(java.lang.String),
XmlHandler.resolveEntity(java.lang.String, java.lang.String)public void endExternalEntity(java.lang.String systemId)
XmlHandlerÆlfred will call this method at the end of each external entity, including the top-level document entity and the external DTD subset.
If necessary, you can use this method to track the location of the current entity so that you can resolve relative URIs correctly.
endExternalEntity in interface XmlHandlerendExternalEntity in class XmlAppsystemId - The URI of the external entity that is ending.XmlHandler.startExternalEntity(java.lang.String),
XmlHandler.resolveEntity(java.lang.String, java.lang.String)public void startDocument()
startDocument in interface XmlHandlerstartDocument in class XmlAppXmlHandler.startDocument()public void endDocument()
endDocument in interface XmlHandlerendDocument in class XmlAppXmlHandler.endDocument()
public void doctypeDecl(java.lang.String name,
java.lang.String pubid,
java.lang.String sysid)
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.XmlHandler.doctypeDecl(java.lang.String, java.lang.String, java.lang.String)
public void attribute(java.lang.String name,
java.lang.String value,
boolean isSpecified)
attribute in interface XmlHandlerattribute in class XmlAppvalue - The value of the attribute, or null if the attribute
is #IMPLIED.isSpecified - True if the value was specified, false if it
was defaulted from the DTD.XmlHandler.attribute(java.lang.String, java.lang.String, boolean)public void startElement(java.lang.String name)
startElement in interface XmlHandlerstartElement in class XmlAppname - The element type name.XmlHandler.startElement(java.lang.String)public void endElement(java.lang.String name)
endElement in interface XmlHandlerendElement in class XmlAppname - The element type name.XmlHandler.endElement(java.lang.String)
public void charData(char[] ch,
int start,
int length)
charData in interface XmlHandlercharData in class XmlAppch - The character data.start - The starting position in the array.length - The number of characters available.XmlHandler.charData(char[], int, int)
public void ignorableWhitespace(char[] ch,
int start,
int length)
ignorableWhitespace in interface XmlHandlerignorableWhitespace in class XmlAppch - The literal whitespace characters.start - The starting position in the array.length - The number of whitespace characters available.XmlHandler.ignorableWhitespace(char[], int, int)
public void processingInstruction(java.lang.String target,
java.lang.String data)
processingInstruction in interface XmlHandlerprocessingInstruction in class XmlApptarget - The target (the name at the start of the PI).data - The data, if any (the rest of the PI).XmlHandler.processingInstruction(java.lang.String, java.lang.String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||