Hello, 

I am having trouble transforming  a node. The problem
is that I get an empty html file. The code is here:
Printing transformedDoc to stdout returns:
transformedDoc:;<?xml version="1.0" encoding="UTF-8"?>


    private void transform(Node currentNode) throws
TransformerException, IOException {
        TransformerFactory factory =
TransformerFactory.newInstance();
        Transformer transformer =
factory.newTransformer(new StreamSource(new
FileInputStream(new File(style).getAbsoluteFile())));
        DocumentSource source = new
DocumentSource(currentNode.getDocument());
        DocumentResult result = new DocumentResult();
        transformer.transform(source, result);
        Document transformedDoc =
result.getDocument();
       
System.out.println("transformedDoc:;"+transformedDoc.asXML());
        HTMLWriter writer = new HTMLWriter(new
FileWriter(
currentNode.valueOf(outNodeName)+".html"));
        writer.write( transformedDoc );
        writer.close();
    }



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to