|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface XmlWriter
This interface is used to construct XML via a sequence of API calls.
This is written to be similar to javax.xml.stream.XMLStreamWriter, but has slightly different requirements. Specifically, we need to be able to create an "ID" type attribute, and get the current node.
| Nested Class Summary | |
|---|---|
static class |
XmlWriter.ToMarshal<CLZ extends XMLStructure>
Utility class that brings together the class, and the method for marshaling an instance of said class. |
| Method Summary | |
|---|---|
String |
getCurrentLocalName()
Get the local name of the current element. |
XMLStructure |
getCurrentNodeAsStructure()
|
void |
marshalStructure(XMLStructure toMarshal,
String dsPrefix,
XMLCryptoContext context)
This method marshals a structure, and relies on implementation specific details for how an instance of a particular class maps to the method that actually does the marshaling. |
Attr |
writeAttribute(String prefix,
String namespaceURI,
String localName,
String value)
|
void |
writeCharacters(String text)
|
void |
writeComment(String text)
|
void |
writeEndElement()
See also XMLStreamWriter.writeEndElement() |
void |
writeIdAttribute(String prefix,
String namespaceURI,
String localName,
String value)
|
void |
writeNamespace(String prefix,
String namespaceURI)
|
void |
writeStartElement(String prefix,
String localName,
String namespaceURI)
|
void |
writeTextElement(String prefix,
String localName,
String namespaceURI,
String value)
Convenience method that writes both a start and end tag, with text contents as provided. |
| Method Detail |
|---|
void writeStartElement(String prefix,
String localName,
String namespaceURI)
prefix - What prefix to use?localName - What local name to use?namespaceURI - What namespace URI?
See also XMLStreamWriter.writeStartElement(String, String, String)void writeEndElement()
XMLStreamWriter.writeEndElement()
void writeTextElement(String prefix,
String localName,
String namespaceURI,
String value)
prefix - localName - namespaceURI - value -
void writeNamespace(String prefix,
String namespaceURI)
void writeCharacters(String text)
void writeComment(String text)
Attr writeAttribute(String prefix,
String namespaceURI,
String localName,
String value)
void writeIdAttribute(String prefix,
String namespaceURI,
String localName,
String value)
String getCurrentLocalName()
XMLStructure getCurrentNodeAsStructure()
void marshalStructure(XMLStructure toMarshal,
String dsPrefix,
XMLCryptoContext context)
throws MarshalException
toMarshal - The object to be marshaled.dsPrefix - The digital signature prefix.context - The context for marshaling.
MarshalException - Thrown if something goes wrong during the marshaling.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||