*/
protected final void loadContents() {
for (int index = 0; index < this.page.getDataSize(); index++) {
final DataUnit du = this.page.getDataUnit(index);
if (du instanceof TagDataUnit) {
final Tag tag = ((TagDataUnit) du).getTag();
if (tag.getType() != Tag.Type.END) {
if (tag.getName().equalsIgnoreCase("a")) {
loadLink(index, tag);
} else if (tag.getName().equalsIgnoreCase("title")) {
loadTitle(index, tag);
} else if (tag.getName().equalsIgnoreCase("form")) {
loadForm(index, tag);
} else if (tag.getName().equalsIgnoreCase("input")) {
loadInput(index, tag);
}
}
if (tag.getType() == Tag.Type.BEGIN) {
if (tag.getName().equalsIgnoreCase("div")) {
loadDiv(index, tag);
} else if (tag.getName().equalsIgnoreCase("span")) {
loadSpan(index, tag);
}
}
if (tag.getType() == Tag.Type.END) {
if (tag.getName().equalsIgnoreCase("div")) {
if (this.lastHierarchyElement != null) {
this.lastHierarchyElement =
this.lastHierarchyElement
.getParent();
}
} else if (tag.getName().equalsIgnoreCase("span")) {
if (this.lastHierarchyElement != null) {
this.lastHierarchyElement =
this.lastHierarchyElement
.getParent();
}