XmlWriterToTree
public interface XmlWriter
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.
Modifier and Type | Interface | Description |
---|---|---|
static class |
XmlWriter.ToMarshal<CLZ extends XMLStructure> |
Utility class that brings together the class, and the method for marshaling an
instance of said class.
|
Modifier and Type | Method | Description |
---|---|---|
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.
|
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 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.Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.