I'm using your library but found that I had to do some preprocessing to remove the DOCTYPE part. In the examples I had before the DOCTYPE part was on a new line and I did a simple String.startsWith("<!DOCTYPE)
but that wasn't clever enough for this trivial example that puts everything on one line
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'><svg enable-background="new 0 0 24 24" id="Layer_1" version="1.0" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M21,11v8c0,1.1-0.9,2-2,2H5c-1.1,0-2-0.9-2-2V5 c0-1.1,0.9-2,2-2h9" fill="none" stroke="#000000" stroke-miterlimit="10" stroke-width="2"/><polyline clip-rule="evenodd" fill="none" fill-rule="evenodd" id="13" points=" 21.2,4.6 11.2,15.2 6.8,10.8 " stroke="#000000" stroke-miterlimit="10" stroke-width="2"/></svg>