Object[] obj = dtd.getItems();
for (int i = 0; i < obj.length; i++) {
if (obj[i] instanceof DTDElement) {
DTDElement element = (DTDElement) obj[i];
String name = element.getName();
DTDItem item = element.getContent();
boolean hasBody = true;
if (item instanceof DTDEmpty) {
hasBody = false;
}
TagInfo tagInfo = new TagInfo(name, hasBody);