|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ssx.xml.output.impl.XmlValidator
A utility class that can be used to drive an XML document producer based on the XmlSink class from java code. This class handles the Verification of the provided XML data ensuring that the XmlSink preconditions are met.
Constructor Summary | |
XmlValidator(XmlSink sink)
Instantiate a new, empty, validator |
Method Summary | |
void |
attribute(String name,
String value)
Add an attribute to the current element using the element namespace. |
void |
attribute(String prefix,
String name,
String value)
Add an attribute to the current element. |
void |
close()
End the output. |
void |
comment(String content)
Write a comment to the output. |
void |
endElement()
End the current element. |
XmlSink |
getSink()
|
void |
instruction(String target,
String data)
Add a processing instruction to the output. |
void |
namespace(String prefix,
String name)
Add a new namespace to the current context. |
void |
startElement(String name)
Start a new element in the output using the default namespace |
void |
startElement(String prefix,
String name)
Start a new element in the output |
void |
text(String text)
Add character data to the output. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XmlValidator(XmlSink sink)
sink
- The XmlSink to be driven by this outputer.Method Detail |
public XmlSink getSink()
public void startElement(String name)
XmlOutput
startElement
in interface XmlOutput
name
- The element nameXmlOutput.startElement(String)
public void startElement(String prefix, String name)
XmlOutput
startElement
in interface XmlOutput
prefix
- The namespace prefixname
- The element nameXmlOutput.startElement(String, String)
public void namespace(String prefix, String name)
namespace
in interface XmlOutput
prefix
- The alias to use for this namespace within the document.
use the empty string or null to denote the default namespace.name
- The namespace nameXmlOutput.namespace(java.lang.String, java.lang.String)
public void attribute(String name, String value)
XmlOutput
attribute
in interface XmlOutput
name
- The attribute namevalue
- The attribute valueXmlOutput.attribute(String, String)
public void attribute(String prefix, String name, String value)
XmlOutput
attribute
in interface XmlOutput
prefix
- The namespace prefixname
- The attribute namevalue
- The attribute valueXmlOutput.attribute(String, String, String)
public void endElement()
XmlOutput
endElement
in interface XmlOutput
XmlOutput.endElement()
public void text(String text)
XmlOutput
text
in interface XmlOutput
text
- The text to add as XML character dataXmlOutput.text(String)
public void instruction(String target, String data)
XmlOutput
instruction
in interface XmlOutput
target
- The name of the PI target.data
- The PI data - may not contain '?>'XmlOutput.instruction(String, String)
public void comment(String content)
XmlOutput
comment
in interface XmlOutput
content
- The content of the comment.XmlOutput.comment(String)
public void close()
XmlOutput
close
in interface XmlOutput
XmlOutput.close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |