use of com.helger.xml.serialize.write.EXMLSerializeDocType in project ph-commons by phax.
the class MicroWriterTest method _testGetNodeAsXHTMLString.
private static void _testGetNodeAsXHTMLString(final IMicroNode aNode) {
// try all permutations
final XMLWriterSettings aSettings = XMLWriterSettings.createForXHTML();
for (int nCharSet = 0; nCharSet < 2; ++nCharSet) {
aSettings.setCharset(nCharSet == 1 ? StandardCharsets.ISO_8859_1 : StandardCharsets.UTF_8);
for (final EXMLSerializeIndent eIndent : EXMLSerializeIndent.values()) {
aSettings.setIndent(eIndent);
for (final EXMLSerializeDocType eDocType : EXMLSerializeDocType.values()) {
aSettings.setSerializeDocType(eDocType);
assertNotNull(MicroWriter.getNodeAsString(aNode, aSettings));
}
}
}
}
use of com.helger.xml.serialize.write.EXMLSerializeDocType in project ph-commons by phax.
the class MicroWriterTest method _testGetNodeAsXMLString.
private static void _testGetNodeAsXMLString(final IMicroNode aNode) {
// try all permutations
final XMLWriterSettings aSettings = new XMLWriterSettings();
for (int nCharSet = 0; nCharSet < 2; ++nCharSet) {
aSettings.setCharset(nCharSet == 1 ? StandardCharsets.ISO_8859_1 : StandardCharsets.UTF_8);
for (final EXMLSerializeIndent eIndent : EXMLSerializeIndent.values()) {
aSettings.setIndent(eIndent);
for (final EXMLSerializeDocType eDocType : EXMLSerializeDocType.values()) {
aSettings.setSerializeDocType(eDocType);
assertNotNull(MicroWriter.getNodeAsString(aNode, aSettings));
}
}
}
}
Aggregations