|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.extex.util.xml.XmlHandler
public class XmlHandler
Generic Handler.
| Field Summary | |
|---|---|
protected XMLStreamWriter |
writer
The XMLStreamWriter for the output. |
| Constructor Summary | |
|---|---|
XmlHandler()
Creates a new object. |
|
XmlHandler(XMLStreamWriter writer)
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
|
java.lang.String |
getCurrentElementName()
Returns the name of the current element. |
java.lang.String |
getCurrentTextValue()
Returns the text of the current element. |
java.lang.String |
getFullName()
Returns the full name of the current element. |
int |
getLevel()
Getter for level. |
boolean |
hasParentElement(java.lang.String name)
Check, if the element is parent of the current entry. |
boolean |
isInElement(java.lang.String name)
Check, if the parser is in the element. |
boolean |
isUseWriter()
Getter for useWriter. |
void |
setUseWriter(boolean useWriter)
Setter for useWriter. |
void |
setWriter(XMLStreamWriter writer)
Setter for writer. |
void |
startDocument()
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
|
protected void |
writeAttr(org.xml.sax.Attributes attributes)
Write the attributes. |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected XMLStreamWriter writer
XMLStreamWriter for the output.
| Constructor Detail |
|---|
public XmlHandler()
public XmlHandler(XMLStreamWriter writer)
writer - The XMLStreamWriter for the output.| Method Detail |
|---|
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionDefaultHandler.characters(char[], int, int)
public void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerendDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionDefaultHandler.endDocument()
public void endElement(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionDefaultHandler.endElement(java.lang.String,
java.lang.String, java.lang.String)public java.lang.String getCurrentElementName()
public java.lang.String getCurrentTextValue()
public java.lang.String getFullName()
public int getLevel()
public boolean hasParentElement(java.lang.String name)
name - The name of the parent.
true, if the element is parent of the
current element, otherwise false.public boolean isInElement(java.lang.String name)
name - The name of the element.
true, if the parser parse the named
element.public boolean isUseWriter()
public void setUseWriter(boolean useWriter)
useWriter - the useWriter to setpublic void setWriter(XMLStreamWriter writer)
writer - the writer to set
public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionDefaultHandler.startDocument()
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionDefaultHandler.startElement(java.lang.String,
java.lang.String, java.lang.String, org.xml.sax.Attributes)
protected void writeAttr(org.xml.sax.Attributes attributes)
throws java.io.IOException
attributes - The attributes.
java.io.IOException - if a io-error occurred.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||