Use this type of MarshalRecord when the marshal target is a Node.
XMLContext xmlContext = new XMLContext("session-name");
XMLMarshaller xmlMarshaller = xmlContext.createMarshaller();
NodeRecord nodeRecord = new NodeRecord();
nodeRecord.setDOM(myNode);
xmlMarshaller.marshal(myObject, nodeRecord);
If the marshal(Node) method is called on XMLMarshaller, then the Writer is automatically wrapped in a NodeRecord.
XMLContext xmlContext = new XMLContext("session-name");
XMLMarshaller xmlMarshaller = xmlContext.createMarshaller();
xmlMarshaller.marshal(myObject, myNode);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|