char c = (text.length() == 0) ? ' ': text.charAt(text.length()-1);
if (c != '\r' && c != '\n') {
System.out.println();
}
} else if (type == DTD) {
DTDInfo info = sr.getDTDInfo();
System.out.println(" DTD (root "
+getNullOrStr(info.getDTDRootName())
+", sysid "+getNullOrStr(info.getDTDSystemId())
+", pubid "+getNullOrStr(info.getDTDPublicId())
+");");
List<?> entities = (List<?>) sr.getProperty("javax.xml.stream.entities");
List<?> notations = (List<?>) sr.getProperty("javax.xml.stream.notations");
int entCount = (entities == null) ? -1 : entities.size();
int notCount = (notations == null) ? -1 : notations.size();