var d=app.activeDocument.xmlElements.item(0); var nxt=d.xmlElements.nextItem(d.xmlElements.item(1)); alert(nxt.characters.length);