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(XMLStreamWriter xmlStreamWriter) |
| Modifier and Type | Method and Description |
|---|---|
void |
attribute(String namespaceURI,
String localName,
String name,
String value)
Receive notification of an attribute.
|
void |
attribute(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
NamespaceResolver namespaceResolver,
String value)
Receive notification of an attribute.
|
void |
cdata(String value)
Receive notification of character data to be wrapped in a CDATA node.
|
void |
characters(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.
|
XMLStreamWriter |
getXMLStreamWriter() |
void |
namespaceDeclarations(NamespaceResolver namespaceResolver)
INTERNAL:
Add the namespace declarations to the XML document.
|
void |
node(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(XMLStreamWriter anXMLStreamWriter) |
void |
startDocument(String encoding,
String version)
Receive notification that a document is being started.
|
void |
startPrefixMapping(String prefix,
String namespaceUri)
Receive notification that a namespace has been declared.
|
void |
startPrefixMappings(NamespaceResolver namespaceResolver) |
add, addGroupingElement, clear, closeStartGroupingElements, endPrefixMapping, endPrefixMappings, getDocument, getDOM, getLocalName, getNamespaceURI, getPositionalNodes, openStartGroupingElements, put, removeGroupingElement, 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, isEmpty, keys, keySet, mergeFrom, put, put, putAll, remove, remove, remove, replaceAt, size, toString, valuespublic XMLStreamWriterRecord(XMLStreamWriter xmlStreamWriter)
public XMLStreamWriter getXMLStreamWriter()
public void setXMLStreamWriter(XMLStreamWriter anXMLStreamWriter)
public void attribute(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
NamespaceResolver namespaceResolver,
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(String namespaceURI, String localName, String name, 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(String value)
MarshalRecordcdata in class MarshalRecordvalue - This is the value of the text to be wrappedpublic void characters(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(Node node, NamespaceResolver resolver)
MarshalRecordnode in class MarshalRecordnode - The Node to be added to the documentpublic void startDocument(String encoding, 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(String prefix, 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 MarshalRecord