public class XMLStreamWriterRecord extends MarshalRecord
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);
XMLMarshaller,
Serialized Form| Constructor and Description |
|---|
XMLStreamWriterRecord(javax.xml.stream.XMLStreamWriter xmlStreamWriter) |
| Modifier and Type | Method and Description |
|---|---|
void |
attribute(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String name,
java.lang.String value)
Receive notification of an attribute.
|
void |
attribute(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
NamespaceResolver namespaceResolver,
java.lang.String value)
Receive notification of an attribute.
|
void |
cdata(java.lang.String value)
Receive notification of character data to be wrapped in a CDATA node.
|
void |
characters(java.lang.String value)
Receive notification of character data.
|
void |
closeStartElement()
Receive notification that all of the attribute events have occurred for
the most recent element that has been started.
|
void |
element(org.eclipse.persistence.internal.oxm.XPathFragment frag)
Receive notification of an element.
|
void |
endDocument()
Recieve notification that a document is being ended.
|
void |
endElement(org.eclipse.persistence.internal.oxm.XPathFragment pathFragment,
NamespaceResolver namespaceResolver)
Receive notification that an element is being ended.
|
javax.xml.stream.XMLStreamWriter |
getXMLStreamWriter() |
void |
namespaceDeclarations(NamespaceResolver namespaceResolver)
INTERNAL:
Add the namespace declarations to the XML document.
|
void |
node(org.w3c.dom.Node node,
NamespaceResolver resolver)
Receive notification of a node.
|
void |
openStartElement(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
NamespaceResolver namespaceResolver)
Receive notification that an element is being started.
|
void |
setXMLStreamWriter(javax.xml.stream.XMLStreamWriter anXMLStreamWriter) |
void |
startDocument(java.lang.String encoding,
java.lang.String version)
Receive notification that a document is being started.
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String namespaceUri)
Receive notification that a namespace has been declared.
|
void |
startPrefixMappings(NamespaceResolver namespaceResolver) |
add, addGroupingElement, afterContainmentMarshal, beforeContainmentMarshal, characters, clear, closeStartGroupingElements, endPrefixMapping, endPrefixMappings, getDocument, getDOM, getGroupingElements, getLocalName, getNamespaceURI, getPositionalNodes, openStartGroupingElements, predicateAttribute, put, removeGroupingElement, setGroupingElement, transformToXMLcontains, get, getCurrentObject, getDocPresPolicy, getIndicatingNoEntry, getLeafElementType, getMarshaller, getNamespaceResolver, getOwningObject, getSession, getUnmarshaller, isXOPPackage, resolveNamespacePrefix, setCurrentObject, setDocPresPolicy, setLeafElementType, setMarshaller, setNamespaceResolver, setOwningObject, setSession, setUnmarshaller, setXOPPackageclone, containsKey, containsKey, containsKey, containsValue, elements, entrySet, get, get, getField, getFields, getIndicatingNoEntry, getValues, getValues, getValues, hasNullValueInFields, isEmpty, keys, keySet, mergeFrom, put, put, putAll, remove, remove, remove, replaceAt, setNullValueInFields, size, toString, valuespublic XMLStreamWriterRecord(javax.xml.stream.XMLStreamWriter xmlStreamWriter)
public javax.xml.stream.XMLStreamWriter getXMLStreamWriter()
public void setXMLStreamWriter(javax.xml.stream.XMLStreamWriter anXMLStreamWriter)
public void attribute(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
NamespaceResolver namespaceResolver,
java.lang.String value)
MarshalRecordattribute in class MarshalRecordxPathFragment - The XPathFragment contains the name and prefix
information about the XML element being ended.namespaceResolver - The NamespaceResolver can be used to resolve the
namespace URI for the namespace prefix held by the XPathFragment (if
required).value - This is the complete value for the attribute.public void attribute(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String name,
java.lang.String value)
MarshalRecordattribute in class MarshalRecordnamespaceURI - The namespace URI, if the attribute is not namespace
qualified the value of this parameter wil be null.localName - The local name of the attribute.name - The qualified name of the attribute.value - This is the complete value for the attribute.public void cdata(java.lang.String value)
MarshalRecordcdata in class MarshalRecordvalue - This is the value of the text to be wrappedpublic void characters(java.lang.String value)
MarshalRecordcharacters in class MarshalRecordvalue - This is the entire value of the text node.public void closeStartElement()
MarshalRecordcloseStartElement in class MarshalRecordpublic void openStartElement(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
NamespaceResolver namespaceResolver)
MarshalRecordopenStartElement in class MarshalRecordxPathFragment - The XPathFragment contains the name and prefix
information about the XML element being ended.namespaceResolver - The NamespaceResolver can be used to resolve the
namespace URI for the namespace prefix held by the XPathFragment (if
required).public void element(org.eclipse.persistence.internal.oxm.XPathFragment frag)
MarshalRecordelement in class MarshalRecordfrag - The XPathFragment of the elementpublic void endDocument()
MarshalRecordendDocument in class MarshalRecordpublic void endElement(org.eclipse.persistence.internal.oxm.XPathFragment pathFragment,
NamespaceResolver namespaceResolver)
MarshalRecordendElement in class MarshalRecordpathFragment - The XPathFragment contains the name and prefix
information about the XML element being ended.namespaceResolver - The NamespaceResolver can be used to resolve the
namespace URI for the namespace prefix held by the XPathFragment (if
required).public void node(org.w3c.dom.Node node,
NamespaceResolver resolver)
MarshalRecordnode in class MarshalRecordnode - The Node to be added to the documentpublic void startDocument(java.lang.String encoding,
java.lang.String version)
MarshalRecordstartDocument in class MarshalRecordencoding - The XML document will be encoded using this encoding.version - This specifies the version of XML.public void startPrefixMapping(java.lang.String prefix,
java.lang.String namespaceUri)
MarshalRecordstartPrefixMapping in class MarshalRecordprefix - The namespace prefix.namespaceUri - The namespace URI.public void namespaceDeclarations(NamespaceResolver namespaceResolver)
MarshalRecordnamespaceDeclarations in class MarshalRecordnamespaceResolver - The NamespaceResolver contains the namespace
prefix and URI pairings that need to be declared.public void startPrefixMappings(NamespaceResolver namespaceResolver)
startPrefixMappings in class MarshalRecordEclipseLink 2.3.2, "build v20111125-r10461" API Reference