|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
javanet.staxutils.StAXContentHandler
javanet.staxutils.StAXEventContentHandler
public class StAXEventContentHandler
SAX ContentHandler that writes events to a StAX XMLEventConsumer.
| Field Summary |
|---|
| Fields inherited from class javanet.staxutils.StAXContentHandler |
|---|
CDATABuffer, docLocator, isCDATA, namespaces, reporter |
| Constructor Summary | |
|---|---|
StAXEventContentHandler()
Constructs a default instance with a default event factory. |
|
StAXEventContentHandler(javax.xml.stream.util.XMLEventConsumer consumer)
Constructs an instance that writes events to the provided XMLEventConsumer. |
|
StAXEventContentHandler(javax.xml.stream.util.XMLEventConsumer consumer,
javax.xml.stream.XMLEventFactory factory)
Constructs an instance that writes events constructed with the provided XMLEventFactory to the provided XMLEventConsumer |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
comment(char[] ch,
int start,
int length)
|
protected javax.xml.stream.events.Namespace |
createNamespace(java.lang.String prefix,
java.lang.String uri)
|
protected void |
createStartEvents(org.xml.sax.Attributes attributes,
java.util.Collection[] events)
Creates the Namespaceand Attributeevents associated
with a StartElement. |
void |
endCDATA()
|
void |
endDocument()
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
|
javax.xml.stream.util.XMLEventConsumer |
getEventConsumer()
Returns a reference to the XMLEventConsumer to which events will
be written. |
javax.xml.stream.XMLEventFactory |
getEventFactory()
Returns a reference to the XMLEventFactory used to construct
events. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
|
void |
setEventConsumer(javax.xml.stream.util.XMLEventConsumer consumer)
Sets the XMLEventConsumer to which events are written. |
void |
setEventFactory(javax.xml.stream.XMLEventFactory factory)
Sets the XMLEventFactory used to create events. |
void |
startDocument()
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
|
| Methods inherited from class javanet.staxutils.StAXContentHandler |
|---|
endDTD, endEntity, endPrefixMapping, error, fatalError, getCurrentLocation, parseQName, reportException, setDocumentLocator, setXMLReporter, startCDATA, startDTD, startEntity, startPrefixMapping, warning |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
notationDecl, resolveEntity, skippedEntity, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StAXEventContentHandler()
XMLEventConsumervia the
setEventConsumer(XMLEventConsumer)method.
public StAXEventContentHandler(javax.xml.stream.util.XMLEventConsumer consumer)
consumer - The XMLEventConsumerto which events will be
written.
public StAXEventContentHandler(javax.xml.stream.util.XMLEventConsumer consumer,
javax.xml.stream.XMLEventFactory factory)
consumer - The XMLEventConsumer to which events will be
written.factory - The XMLEventFactory used to construct events. If
null, a default instance will be constructed.| Method Detail |
|---|
public javax.xml.stream.util.XMLEventConsumer getEventConsumer()
XMLEventConsumer to which events will
be written.
XMLEventConsumer to which events will be written.public void setEventConsumer(javax.xml.stream.util.XMLEventConsumer consumer)
XMLEventConsumer to which events are written.
consumer - The XMLEventConsumer to which events will be
written.public javax.xml.stream.XMLEventFactory getEventFactory()
XMLEventFactory used to construct
events.
XMLEventFactory used to construct events.public void setEventFactory(javax.xml.stream.XMLEventFactory factory)
XMLEventFactory used to create events.
factory - The XMLEventFactory used to create events.
public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerstartDocument in class StAXContentHandlerorg.xml.sax.SAXException
public void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerendDocument in class StAXContentHandlerorg.xml.sax.SAXException
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 StAXContentHandlerorg.xml.sax.SAXException
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class StAXContentHandlerorg.xml.sax.SAXException
public void comment(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
comment in interface org.xml.sax.ext.LexicalHandlercomment in class StAXContentHandlerorg.xml.sax.SAXException
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class StAXContentHandlerorg.xml.sax.SAXException
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
ignorableWhitespace in interface org.xml.sax.ContentHandlerignorableWhitespace in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
processingInstruction in interface org.xml.sax.ContentHandlerprocessingInstruction in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void endCDATA()
throws org.xml.sax.SAXException
endCDATA in interface org.xml.sax.ext.LexicalHandlerendCDATA in class StAXContentHandlerorg.xml.sax.SAXException
protected void createStartEvents(org.xml.sax.Attributes attributes,
java.util.Collection[] events)
Namespaceand Attributeevents associated
with a StartElement.
attributes - The SAX attributes object.events - An array used to return the two collections of
Namespaceand Attributeevents. The
namespaces will be placed at events[0] and the
attributes as events[1].
protected javax.xml.stream.events.Namespace createNamespace(java.lang.String prefix,
java.lang.String uri)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||