// serialize a node to a file, output stream, DOM, JDom...
System.out.println( "\n\n\nINICIO");
HtmlCleaner cleaner = new HtmlCleaner();
CleanerProperties props = cleaner.getProperties();
PrettyXmlSerializer serializer = new PrettyXmlSerializer( props);
for( int i=0 ; i<nodes.length ; i++) {
System.out.println( "######################## Va uno " + i);
OutputStream oStream = new ByteArrayOutputStream( );
if( nodes[i] instanceof TagNode) {
serializer.writeXmlToStream( (TagNode)nodes[i], oStream);
}
else {
oStream.write( nodes[i].toString().getBytes());
}
System.out.println( oStream);