* @param offset the offset with given document
* @return Node either element, doctype, text, or null
*/
public static final Node getNodeByOffset(IDocument document, int offset) {
// get the node at offset (returns either: element, doctype, text)
IndexedRegion inode = null;
IStructuredModel sModel = null;
try {
sModel = org.eclipse.wst.sse.core.StructuredModelManager.getModelManager()
.getExistingModelForRead(document);
if (sModel == null && document instanceof IStructuredDocument) {