// 3. Use XSLT! http://lists.xml.org/archives/xml-dev/200408/msg00072.html
// In fact I use the library
// See http://www.ibm.com/developerworks/java/library/j-io1/
// Though the byte array would work ok as well.
DOMSerializerEngine engine
= new DOMSerializerEngine( (org.w3c.dom.Node)w3cDoc.getDocumentElement() );
return saveRawXmlPart(jcrSession, baseNode, partName, mimeType, new OutputEngineInputStream(engine));
} catch (Exception e ) {
e.printStackTrace();