/*
* On Attr nodes, select the owner Element. On Text nodes, select
* the parent Element.
*/
Object[] selectedObjects = new Object[structuredSel.size()];
System.arraycopy(structuredSel.toArray(), 0, selectedObjects, 0, selectedObjects.length);
for (int i = 0; i < selectedObjects.length; i++) {
Object inode = selectedObjects[i];
if (inode instanceof Node) {
Node node = (Node) inode;
// replace Attribute Node with its owner