XmlWriter.ToMarshal<CLZ extends XMLStructure>| Constructor and Description |
|---|
XmlWriterToTree(List<XmlWriter.ToMarshal<? extends XMLStructure>> marshallers,
Node parent) |
XmlWriterToTree(List<XmlWriter.ToMarshal<? extends XMLStructure>> marshallers,
Node parent,
Node nextSibling)
In cases where the serialization is supposed to precede a specific
element, we add an extra parameter to capture that.
|
| Modifier and Type | Method and Description |
|---|---|
Element |
getCreatedElement()
Get the root element created with this writer.
|
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.
|
void |
resetToNewParent(Node newParent)
Reset to a new parent so that the writer can be re-used.
|
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.
|
public XmlWriterToTree(List<XmlWriter.ToMarshal<? extends XMLStructure>> marshallers, Node parent)
public XmlWriterToTree(List<XmlWriter.ToMarshal<? extends XMLStructure>> marshallers, Node parent, Node nextSibling)
marshallers - parent - nextSibling - The first element created will be created *before* this element.public void resetToNewParent(Node newParent)
newParent - public Element getCreatedElement()
public void writeStartElement(String prefix, String localName, String namespaceURI)
writeStartElement in interface XmlWriterprefix - What prefix to use?localName - What local name to use?namespaceURI - What namespace URI?
See also XMLStreamWriter.writeStartElement(String, String, String)public void writeEndElement()
XmlWriterXMLStreamWriter.writeEndElement()writeEndElement in interface XmlWriterpublic void writeTextElement(String prefix, String localName, String namespaceURI, String value)
XmlWriterwriteTextElement in interface XmlWriterpublic void writeNamespace(String prefix, String namespaceURI)
writeNamespace in interface XmlWriterpublic void writeCharacters(String text)
writeCharacters in interface XmlWriterpublic void writeComment(String text)
writeComment in interface XmlWriterpublic Attr writeAttribute(String prefix, String namespaceURI, String localName, String value)
writeAttribute in interface XmlWriterpublic void writeIdAttribute(String prefix, String namespaceURI, String localName, String value)
writeIdAttribute in interface XmlWriterpublic String getCurrentLocalName()
XmlWritergetCurrentLocalName in interface XmlWriterpublic XMLStructure getCurrentNodeAsStructure()
getCurrentNodeAsStructure in interface XmlWriterpublic void marshalStructure(XMLStructure toMarshal, String dsPrefix, XMLCryptoContext context) throws MarshalException
XmlWritermarshalStructure in interface XmlWritertoMarshal - 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–2015 The Apache Software Foundation. All rights reserved.