convert.convertInfo();
}
private void convertInfo() {
for (Iterator it = ctx.iteratePointers("//info/title"); it.hasNext();) {
DOMNodePointer p = (DOMNodePointer) it.next();
Element title = (Element) p.getBaseValue();
Element newTitle = document.createElementNS(NamespaceURI.DUBLIN_CORE, "dc:title");
newTitle.appendChild(document.createTextNode(DOMUtil.getText(title)));
Element info = (Element) title.getParentNode();
info.insertBefore(newTitle, title);
info.removeChild(title);
}
for (Iterator it = ctx.iteratePointers("//info/description"); it.hasNext();) {
DOMNodePointer p = (DOMNodePointer) it.next();
Element description = (Element) p.getBaseValue();
Element newDescription = document.createElementNS(NamespaceURI.DUBLIN_CORE, "dc:description");
newDescription.appendChild(document.createTextNode(DOMUtil.getText(description)));
Element info = (Element) description.getParentNode();
info.insertBefore(newDescription, description);
info.removeChild(description);
}
for (Iterator it = ctx.iteratePointers("//site/description|//feed/description"); it.hasNext(); ) {
DOMNodePointer p = (DOMNodePointer) it.next();
Element description = (Element) p.getBaseValue();
Element parent = (Element) description.getParentNode();
Element newDescription = document.createElementNS(NamespaceURI.DUBLIN_CORE, "dc:description");
newDescription.appendChild(document.createTextNode(DOMUtil.getText(description)));
parent.removeChild(description);
Element info = document.createElement("info");