Search in sources :

Example 1 with EXMLSerializeDocType

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));
            }
        }
    }
}
Also used : EXMLSerializeIndent(com.helger.xml.serialize.write.EXMLSerializeIndent) XMLWriterSettings(com.helger.xml.serialize.write.XMLWriterSettings) EXMLSerializeDocType(com.helger.xml.serialize.write.EXMLSerializeDocType)

Example 2 with EXMLSerializeDocType

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));
            }
        }
    }
}
Also used : EXMLSerializeIndent(com.helger.xml.serialize.write.EXMLSerializeIndent) XMLWriterSettings(com.helger.xml.serialize.write.XMLWriterSettings) EXMLSerializeDocType(com.helger.xml.serialize.write.EXMLSerializeDocType)

Aggregations

EXMLSerializeDocType (com.helger.xml.serialize.write.EXMLSerializeDocType)2 EXMLSerializeIndent (com.helger.xml.serialize.write.EXMLSerializeIndent)2 XMLWriterSettings (com.helger.xml.serialize.write.XMLWriterSettings)2