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);
XMLMarshallerMarshalRecord.CycleDetectionStack<E>XMLRecord.NilDEFAULT_ATTRIBUTE_GROUP, NIL| 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(XPathFragment xPathFragment,
NamespaceResolver namespaceResolver,
java.lang.String value)
Receive notification of an attribute.
|
void |
attributeWithoutQName(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String prefix,
java.lang.String value) |
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 |
defaultNamespaceDeclaration(java.lang.String defaultNamespace)
Add the defaultNamespace declaration
|
void |
element(XPathFragment frag)
Receive notification of an element.
|
void |
endDocument()
Recieve notification that a document is being ended.
|
void |
endElement(XPathFragment pathFragment,
NamespaceResolver namespaceResolver)
Receive notification that an element is being ended.
|
javax.xml.stream.XMLStreamWriter |
getXMLStreamWriter() |
boolean |
isNamespaceAware()
Determine if namespaces will be considered during marshal/unmarshal operations.
|
void |
namespaceDeclaration(java.lang.String prefix,
java.lang.String namespaceURI)
Add the specified namespace declaration
|
void |
namespaceDeclarations(NamespaceResolver namespaceResolver)
INTERNAL:
Add the namespace declarations to the XML document.
|
void |
node(org.w3c.dom.Node node,
NamespaceResolver resolver,
java.lang.String uri,
java.lang.String name)
Receive notification of a node.
|
void |
openStartElement(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, attribute, beforeContainmentMarshal, characters, clear, closeStartGroupingElements, emptyAttribute, emptyCollection, emptyComplex, emptySimple, endCollection, endPrefixMapping, endPrefixMappings, flush, forceValueWrapper, getCurrentAttributeGroup, getCycleDetectionStack, getDocument, getDOM, getGroupingElements, getLocalName, getNamespaceURI, getPositionalNodes, getTextWrapperFragment, getValueToWrite, isWrapperAsCollectionName, marshalWithoutRootElement, nilComplex, nilSimple, node, openStartGroupingElements, popAttributeGroup, predicateAttribute, pushAttributeGroup, put, removeGroupingElement, setGroupingElement, setSession, startCollection, transformToXML, writeHeaderaddExtraNamespacesToNamespaceResolver, addXsiTypeAndClassIndicatorIfRequired, addXsiTypeAndClassIndicatorIfRequired, getConversionManager, getLeafElementType, getMarshaller, getNamespaceResolver, getNamespaceSeparator, getOwningObject, getSession, hasCustomNamespaceMapper, hasEqualNamespaceResolvers, isXOPPackage, removeExtraNamespacesFromNamespaceResolver, resolveNamespacePrefix, setCustomNamespaceMapper, setEqualNamespaceResolvers, setLeafElementType, setLeafElementType, setMarshaller, setNamespaceResolver, setOwningObject, setXOPPackage, writeXsiTypeAttribute, writeXsiTypeAttributeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasCustomNamespaceMapper, isXOPPackage, removeExtraNamespacesFromNamespaceResolver, setLeafElementType, setMarshalleraddExtraNamespacesToNamespaceResolver, addXsiTypeAndClassIndicatorIfRequired, addXsiTypeAndClassIndicatorIfRequired, getLeafElementType, getMarshaller, getNamespaceResolver, getOwningObject, hasEqualNamespaceResolvers, resolveNamespacePrefix, setCustomNamespaceMapper, setEqualNamespaceResolvers, setLeafElementType, setNamespaceResolver, setOwningObject, setXOPPackage, writeXsiTypeAttribute, writeXsiTypeAttributegetConversionManager, getNamespaceSeparator, getSessionpublic XMLStreamWriterRecord(javax.xml.stream.XMLStreamWriter xmlStreamWriter)
public javax.xml.stream.XMLStreamWriter getXMLStreamWriter()
public void setXMLStreamWriter(javax.xml.stream.XMLStreamWriter anXMLStreamWriter)
public void attribute(XPathFragment xPathFragment, NamespaceResolver namespaceResolver, java.lang.String value)
MarshalRecordattribute in interface 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 defaultNamespaceDeclaration(java.lang.String defaultNamespace)
MarshalRecorddefaultNamespaceDeclaration in class MarshalRecordpublic void namespaceDeclaration(java.lang.String prefix,
java.lang.String namespaceURI)
MarshalRecordnamespaceDeclaration in interface AbstractMarshalRecordnamespaceDeclaration in interface MarshalRecordnamespaceDeclaration in class MarshalRecordpublic void attributeWithoutQName(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String prefix,
java.lang.String value)
attributeWithoutQName in interface AbstractMarshalRecordattributeWithoutQName in interface MarshalRecordattributeWithoutQName in class AbstractMarshalRecordImplpublic void attribute(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String name,
java.lang.String value)
MarshalRecordattribute in interface AbstractMarshalRecordattribute in interface 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 interface MarshalRecordcdata in class MarshalRecordvalue - This is the value of the text to be wrappedpublic void characters(java.lang.String value)
MarshalRecordcharacters in interface MarshalRecordcharacters in class MarshalRecordvalue - This is the entire value of the text node.public boolean isNamespaceAware()
AbstractMarshalRecordImplisNamespaceAware in interface AbstractMarshalRecordisNamespaceAware in interface XMLRecordisNamespaceAware in class AbstractMarshalRecordImplpublic void closeStartElement()
MarshalRecordcloseStartElement in interface MarshalRecordcloseStartElement in class MarshalRecordpublic void openStartElement(XPathFragment xPathFragment, NamespaceResolver namespaceResolver)
MarshalRecordopenStartElement in interface 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(XPathFragment frag)
MarshalRecordelement in class MarshalRecordfrag - The XPathFragment of the elementpublic void endDocument()
MarshalRecordendDocument in class MarshalRecordpublic void endElement(XPathFragment pathFragment, NamespaceResolver namespaceResolver)
MarshalRecordendElement in interface 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,
java.lang.String uri,
java.lang.String name)
MarshalRecordnode in class MarshalRecordnode - The Node to be added to the documentresolver - The NamespaceResolver can be used to resolve theuri - replacement root name for the nodename - replacement root namespace for the node
namespace URI/prefix of the nodepublic 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 interface 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.6.3, "build v20160428-59c81c5" API Reference