Use this type of MarshalRecord when the marshal target is an XMLStreamWriter
XMLContext xmlContext = new XMLContext("session-name");
XMLMarshaller xmlMarshaller = xmlContext.createMarshaller();
XMLStreamWriterRecord writerRecord = new XMLStreamWriterRecord(xmlStreamWriter);
xmlMarshaller.marshal(myObject, writerRecord);
org.eclipse.persistence.oxm.XMLMarshaller
| Modifier and Type | Field and Description |
|---|---|
| private DomToXMLStreamWriter | |
| private NamespaceResolver | |
| private Map | |
| private XMLStreamWriter |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | attribute(XPathFragment<XML_FIELD extends Field>
The XPathFragment contains the name and prefix
information about the XML element being ended. xPathFragment, NamespaceResolver The NamespaceResolver can be used to resolve the
namespace URI for the namespace prefix held by the XPathFragment (if
required). namespaceResolver, String This is the complete value for the attribute. value)Implements abstract org. Implements org. |
| public void | attribute(String
The namespace URI, if the attribute is not namespace
qualified the value of this parameter wil be null. namespaceURI, String The local name of the attribute. localName, String The qualified name of the attribute. name, String This is the complete value for the attribute. value)Implements abstract org. Implements org. |
| public void | attributeWithoutQName(String namespaceURI, String localName, String prefix, String value)
Overrides org. Implements org. |
| public void | cdata(String
This is the value of the text to be wrapped value)Implements abstract org. Implements org. |
| public void | characters(String
This is the entire value of the text node. value)Implements abstract org. Implements org. |
| public void | closeStartElement()
Implements abstract org. Implements org. |
| public void | defaultNamespaceDeclaration(String defaultNamespace)
Overrides org. |
| public void | element(XPathFragment<XML_FIELD extends Field>
The XPathFragment of the element frag)Implements abstract org. |
| public void | endDocument()
Implements abstract org. |
| public void | endElement(XPathFragment<XML_FIELD extends Field>
The XPathFragment contains the name and prefix
information about the XML element being ended. pathFragment, NamespaceResolver The NamespaceResolver can be used to resolve the
namespace URI for the namespace prefix held by the XPathFragment (if
required). namespaceResolver)Implements abstract org. Implements org. |
| private DomToXMLStreamWriter | |
| public XMLStreamWriter | |
| public boolean | isNamespaceAware()
Overrides org. Implements org. |
| public void | namespaceDeclaration(String prefix, String namespaceURI)
Overrides org. Implements org. |
| public void | namespaceDeclarations(NamespaceResolver
The NamespaceResolver contains the namespace
prefix and URI pairings that need to be declared. namespaceResolver)Overrides org. |
| public void | node(Node
The Node to be added to the document node, NamespaceResolver The NamespaceResolver can be used to resolve the resolver, String replacement root name for the node uri, String replacement root namespace for the node
namespace URI/prefix of the node name)Implements abstract org. |
| public void | openStartElement(XPathFragment<XML_FIELD extends Field>
The XPathFragment contains the name and prefix
information about the XML element being ended. xPathFragment, NamespaceResolver The NamespaceResolver can be used to resolve the
namespace URI for the namespace prefix held by the XPathFragment (if
required). namespaceResolver)Overrides org. Implements org. |
| public void | |
| public void | startDocument(String
The XML document will be encoded using this encoding. encoding, String This specifies the version of XML. version)Implements abstract org. |
| public void | startPrefixMapping(String
The namespace prefix. prefix, String The namespace URI. namespaceUri)Overrides org. Implements org. |
| public void | startPrefixMappings(NamespaceResolver namespaceResolver)
Overrides org. |
| private void |
| domToStreamWriter | back to summary |
|---|---|
| private DomToXMLStreamWriter domToStreamWriter | |
| namespaceResolver | back to summary |
|---|---|
| private NamespaceResolver namespaceResolver Hides org. | |
| prefixMapping | back to summary |
|---|---|
| private Map<String, String> prefixMapping | |
| xmlStreamWriter | back to summary |
|---|---|
| private XMLStreamWriter xmlStreamWriter | |
| XMLStreamWriterRecord | back to summary |
|---|---|
| public XMLStreamWriterRecord(XMLStreamWriter xmlStreamWriter) | |
| attribute | back to summary |
|---|---|
| public void attribute(XPathFragment<XML_FIELD extends Field> xPathFragment, NamespaceResolver namespaceResolver, String value) Implements abstract org. Implements org. Doc from org. Receive notification of an attribute.
| |
| attribute | back to summary |
|---|---|
| public void attribute(String namespaceURI, String localName, String name, String value) Implements abstract org. Implements org. Doc from org. Receive notification of an attribute.
| |
| attributeWithoutQName | back to summary |
|---|---|
| public void attributeWithoutQName(String namespaceURI, String localName, String prefix, String value) Overrides org. Implements org.
| |
| cdata | back to summary |
|---|---|
| public void cdata(String value) Implements abstract org. Implements org. Doc from org. Receive notification of character data to be wrapped in a CDATA node. | |
| characters | back to summary |
|---|---|
| public void characters(String value) Implements abstract org. Implements org. Doc from org. Receive notification of character data. | |
| closeStartElement | back to summary |
|---|---|
| public void closeStartElement() Implements abstract org. Implements org. Doc from org. Receive notification that all of the attribute events have occurred for the most recent element that has been started.
| |
| defaultNamespaceDeclaration | back to summary |
|---|---|
| public void defaultNamespaceDeclaration(String defaultNamespace) Overrides org. Doc from org. Add the defaultNamespace declaration
| |
| element | back to summary |
|---|---|
| public void element(XPathFragment<XML_FIELD extends Field> frag) Implements abstract org. Doc from org. Receive notification of an element.
| |
| endDocument | back to summary |
|---|---|
| public void endDocument() Implements abstract org. Doc from org. Recieve notification that a document is being ended.
| |
| endElement | back to summary |
|---|---|
| public void endElement(XPathFragment<XML_FIELD extends Field> pathFragment, NamespaceResolver namespaceResolver) Implements abstract org. Implements org. Doc from org. Receive notification that an element is being ended.
| |
| getDomToXMLStreamWriter | back to summary |
|---|---|
| private DomToXMLStreamWriter getDomToXMLStreamWriter() | |
| getXMLStreamWriter | back to summary |
|---|---|
| public XMLStreamWriter getXMLStreamWriter() | |
| isNamespaceAware | back to summary |
|---|---|
| public boolean isNamespaceAware() Overrides org. Implements org. Doc from org. Determine if namespaces will be considered during marshal/unmarshal operations.
| |
| namespaceDeclaration | back to summary |
|---|---|
| public void namespaceDeclaration(String prefix, String namespaceURI) Overrides org. Implements org. Doc from org. Add the specified namespace declaration
| |
| namespaceDeclarations | back to summary |
|---|---|
| public void namespaceDeclarations(NamespaceResolver namespaceResolver) Overrides org. Doc from org. INTERNAL: Add the namespace declarations to the XML document.
| |
| node | back to summary |
|---|---|
| public void node(Node node, NamespaceResolver resolver, String uri, String name) Implements abstract org. Doc from org. Receive notification of a node.
| |
| openStartElement | back to summary |
|---|---|
| public void openStartElement(XPathFragment<XML_FIELD extends Field> xPathFragment, NamespaceResolver namespaceResolver) Overrides org. Implements org. Doc from org. Receive notification that an element is being started.
| |
| setXMLStreamWriter | back to summary |
|---|---|
| public void setXMLStreamWriter(XMLStreamWriter anXMLStreamWriter) | |
| startDocument | back to summary |
|---|---|
| public void startDocument(String encoding, String version) Implements abstract org. Doc from org. Receive notification that a document is being started. | |
| startPrefixMapping | back to summary |
|---|---|
| public void startPrefixMapping(String prefix, String namespaceUri) Overrides org. Implements org. Doc from org. Receive notification that a namespace has been declared. | |
| startPrefixMappings | back to summary |
|---|---|
| public void startPrefixMappings(NamespaceResolver namespaceResolver) Overrides org.
| |
| writePrefixMappings | back to summary |
|---|---|
| private void writePrefixMappings() | |