|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--superwaba.ext.xplat.xml.XmlTokenizer
|
+--superwaba.ext.xplat.xml.DumpXml
Dumb Xml class used only to dump to the Debug Console the contents of a XML. It implementss each of the methods that are called by the XmlTokenizer class. You can run this to understand how to handle a XML.
| Constructor Summary | |
DumpXml()
Must call tokenize by yourself. |
|
DumpXml(Stream stream)
|
|
| Method Summary | |
void |
foundAttributeName(byte[] buffer,
int offset,
int count)
Method called when an attribute name has been found. |
void |
foundAttributeValue(byte[] buffer,
int offset,
int count,
byte dlm)
Method called when an attribute value has been found. |
void |
foundCharacter(char charFound)
Method called when a character has been found in contents, this character resulting from a character reference resolution. |
void |
foundCharacterData(byte[] buffer,
int offset,
int count)
Method called when character data content has been found. |
void |
foundEndEmptyTag()
Method called when an empty-tag has been found. |
void |
foundEndOfInput(int count)
Method called when the end of the input was found, and tokenization is about to end. |
void |
foundEndTagName(byte[] buffer,
int offset,
int count)
Method called when an end-tag has been found. |
void |
foundStartOfInput(byte[] buffer,
int offset,
int count)
Method called before to start tokenizing. |
void |
foundStartTagName(byte[] buffer,
int offset,
int count)
Method called when a start-tag has been found. |
| Methods inherited from class superwaba.ext.xplat.xml.XmlTokenizer |
disableReferenceResolution,
foundComment,
foundDeclaration,
foundInvalidData,
foundProcessingInstruction,
foundReference,
getAbsoluteOffset,
isDataCDATA,
resolveCharacterReference,
setCdataContents,
setStrictlyXml,
tokenize,
tokenize,
tokenize,
tokenize |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public DumpXml()
public DumpXml(Stream stream)
throws SyntaxException
| Method Detail |
public void foundStartOfInput(byte[] buffer,
int offset,
int count)
Derived class may override this method, for doing whatever appropriate housekeeping (sniffing at the encoding, etc.)
input - byte array containing the first bytes of the input about to
be tokenizedoffset - position of the first byte to be tokenizedcount - number of bytes to be tokenized
public void foundStartTagName(byte[] buffer,
int offset,
int count)
Derived class may override this method.
input - byte array containing the name of the tag that startedoffset - position of the first character of the tag name in the arraycount - number of bytes the tag name is made of
public void foundEndTagName(byte[] buffer,
int offset,
int count)
Derived class may override this method.
input - byte array containing the name of the tag that endedoffset - position of the first character of the tag name in the arraycount - number of bytes the tag name is made ofpublic void foundEndEmptyTag()
This method is called just after all events related to the starting tag have been reported. The implied tagName is the one of the starting tag (e.g.: the most recently reported start-tag.)
Derived class may override this method.
Example:generates: - foundStartTagName("FOO"); - foundAttributeName("A"); - foundAttributeValue("B"); - foundEndEmptyTag();
public void foundCharacterData(byte[] buffer,
int offset,
int count)
Derived class may override this method.
input - byte array containing the character data that was foundoffset - position of the first character data in the arraycount - number of bytes the character data content is made ofpublic void foundCharacter(char charFound)
Derived class may override this method.
charFound - resolved character - if the character is invalid,
this value is set to '\uffff', which is not a Unicode character.XmlTokenizer.foundReference(byte[],int,int)
public void foundAttributeName(byte[] buffer,
int offset,
int count)
Derived class may override this method.
input - byte array containing the attribute nameoffset - position of the first character of the attribute name
in the arraycount - number of bytes the attribute name is made of
public void foundAttributeValue(byte[] buffer,
int offset,
int count,
byte dlm)
Derived class may override this method.
input - byte array containing the attribute valueoffset - position of the first character of the attribute value
in the arraycount - number of bytes the attribute value is made ofdlm - delimiter that started the attribute value (' or ").
'\0' if nonepublic void foundEndOfInput(int count)
Derived class may override this method.
count - count of bytes parsed
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||