Hey,
I have a reference to a XML node which is part of a bigger XML tree. Is there a way to get that elements next/previous sibling without accessing the parent and looking for it? Something like DOM's nextSibling
would be what I look for.
edit: Given that there is no natural way to do this with E4X, I'll just stick to the following (except that in my case, I'll store the actual index somewhere instead):
// next sibling:
node.parent().children()[ node.childIndex() + 1 ]
// previous sibling:
node.parent().children()[ node.childIndex() - 1 ]