public static String colorPrint(String xml, int blanks, boolean declaration, ColorPrintElement color)
            throws Exception {
        return doParse(xml, blanks, declaration, color);
    }
@Test
    public void testPrettyPrintColor() throws Exception {
        String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><tag><nested>hello</nested></tag></root>";
        String expected = "*<?xml version=\"1.0\" encoding=\"UTF-8\"?>*\n"
                          + "*<root>*\n"
                          + "  *<tag>*\n"
                          + "    *<nested>*\n"
                          + "      *hello*\n"
                          + "    *</nested>*\n"
                          + "  *</tag>*\n"
                          + "*</root>*";
        String pretty = XmlPrettyPrinter.colorPrint(xml, 2, true, new XmlPrettyPrinter.ColorPrintElement() {
            @Override
            public String color(int type, String value) {
                return "*" + value + "*";
            }
        });
        Assertions.assertEquals(expected, pretty);
    }