Did anybody have success using HTMLSerializer? I am using it
in the following way, and it is not showing the attributes
of any element:
public static String serializeXml(Document doc)
throws Exception {
try {
StringWriter writer = new StringWriter();
OutputFormat outputFormat = new //OutputFormat
((HTMLDocument)doc);
OutputFormat(Method.HTML,"UTF-8",true);
outputFormat.setPreserveEmptyAttributes (true);
HTMLSerializer serializer = new HTMLSerializer(writer,
outputFormat);
serializer.serialize(doc);
String s = writer.toString();
return s;
}
catch (Exception e) {
throw new Exception(e.getMessage());
}
}
I even tried using the XML and XHTML serializers, same problem.
Pls let me know if I am doing anything wrong, or is this a bug.
thanks
st
PS: I tried with both xerces 1.4.4 and 2.0.1.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]