|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ssx.xml.output.sinks.SaxSink
Output XML to a SAX2 interface. This sink currently provides no support for the SAX2 LexicalHandler or ErrorHandler. Support for the LexicalHandler should be added soon. Support for the ErrorHandler might be added if there is a need - prehaps to report warnings? Support for the SAX2 LocationHandler is not provided and probably will not be. There is no line or column number available when the XML is generated from code. (unless we could determine the line and column number of the method call that generate the event?) No DTD handling of any kind is performed because the concept does not exist in the XmlOutput interface.
| Constructor Summary | |
SaxSink(ContentHandler out,
boolean namespaceAttribs)
Create a sink that produces SAX events |
|
| Method Summary | |
void |
close()
The user has finished providing XML. |
void |
comment(String content)
Add a comment |
void |
endElement(Namespace namespace,
String name,
List namespaceList,
boolean empty)
End an element. |
void |
instruction(String target,
String data)
Add a processing instruction |
void |
open()
This method will be called before any other methods, after the user has provided the first xml node |
void |
startElement(Namespace namespace,
String name,
AttributeList attributes,
List namespaceList,
boolean empty)
Start a new element |
void |
text(String text)
Add character data |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SaxSink(ContentHandler out,
boolean namespaceAttribs)
out - The SAX2 Content handler that XML events will be reported to.namespaceAttribs - Should namespace attributes be reported| Method Detail |
public void open()
XmlSink
open in interface XmlSinkXmlSink.open()public void comment(String content)
XmlSink
comment in interface XmlSinkcontent - The text content of the commentXmlSink.comment(String)
public void endElement(Namespace namespace,
String name,
List namespaceList,
boolean empty)
XmlSink
endElement in interface XmlSinknamespace - The element namespacename - The element namenamespaceList - The namespaces that were declared in this elementempty - True if the element contains no other nodesXmlSink.endElement(
Namespace, String, List, boolean)
public void instruction(String target,
String data)
XmlSink
instruction in interface XmlSinktarget - The PI targetdata - The PI data - structure depends on the PIXmlSink.instruction(String, String)
public void startElement(Namespace namespace,
String name,
AttributeList attributes,
List namespaceList,
boolean empty)
XmlSink
startElement in interface XmlSinknamespace - The element namespacename - The element nameattributes - The element attributesnamespaceList - The namespaces declared in this elementempty - True if the element contains no other nodesXmlSink.startElement(
com.ssx.xml.output.Namespace, java.lang.String, AttributeList,
List, boolean)public void text(String text)
XmlSink
text in interface XmlSinktext - The String to add as character dataXmlSink.text(String)public void close()
XmlSink
close in interface XmlSinkXmlSink.close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||