How to get xml node from XML Editor by cursor position?
The selection from the editor should already contain the Node at the
current cursor offset, otherwise you can request the
org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools
adapter from the editor. You'll want to cast the result to
org.eclipse.wst.xml.ui.internal.provisional.IDOMSourceEditingTextTools
as that's the interface for XML.