private static TagNode parse(String document) throws IOException {
return getCleaner().clean(document);
}
private static String write(TagNode node) throws IOException {
XmlSerializer serializer = new PrettyXmlSerializer(getCleaner()
.getProperties());
StringWriter writer = new StringWriter();
node.serialize(serializer, writer);
return writer.toString();
}