String str = "\n\tElement type=" + el.toName();
List elems = ((XMLCollection) el).toElements();
for (int i = 0; i < elems.size(); i++) {
XMLElement attr = (XMLElement) elems.get(i);
if (attr instanceof XMLAttribute) {
str += "\n\t " + i + ". attribute [" + attr.toName() + "," + attr.toValue() + "]";
}
if (attr instanceof XMLSimpleElement) {
str += "\n\t " + i + ". simple el [" + attr.toName() + "," + attr.toValue() + "]";
} else {
toString(attr);