Search in sources :

Example 1 with XmlNodeSerializer

use of com.enonic.xp.core.impl.export.xml.XmlNodeSerializer in project xp by enonic.

the class NodeExporter method writeVersion.

private void writeVersion(final Node node, final Path baseFolder) {
    final NodePath newParentPath = resolveNewParentPath(node);
    final Node relativeNode = Node.create(node).parentPath(newParentPath).build();
    final XmlNodeSerializer serializer = new XmlNodeSerializer();
    serializer.exportNodeIds(this.exportNodeIds);
    serializer.node(relativeNode);
    final String serializedNode = serializer.serialize();
    if (!dryRun) {
        final Path nodeXmlPath = baseFolder.resolve(NodeExportPathResolver.NODE_XML_EXPORT_NAME);
        exportWriter.writeElement(nodeXmlPath, serializedNode);
    }
    exportNodeBinaries(relativeNode, baseFolder);
}
Also used : NodePath(com.enonic.xp.node.NodePath) Path(java.nio.file.Path) Node(com.enonic.xp.node.Node) XmlNodeSerializer(com.enonic.xp.core.impl.export.xml.XmlNodeSerializer) NodePath(com.enonic.xp.node.NodePath)

Aggregations

XmlNodeSerializer (com.enonic.xp.core.impl.export.xml.XmlNodeSerializer)1 Node (com.enonic.xp.node.Node)1 NodePath (com.enonic.xp.node.NodePath)1 Path (java.nio.file.Path)1