+ if (data instanceof ContainerNode) {
+ writeRootElement(xmlWriter, nnWriter, (ContainerNode) data);
+ } else if (data instanceof MapNode) {
+ writeRootElement(xmlWriter, nnWriter, (MapNode) data);
+ } else {
+ throw new IllegalArgumentException("Unable to transform node of type: " + data.getClass().toString()
+ + " offending node: " + data.toString());
+ }
+