ACTF Editors provides access to model of content through IModelService interface. Implementations will return the content model as W3C DOM (org.w3c.dom). Typical IModelService implementations returns two types of Document (org.w3c.dom.Document), Live Document and Source Document.
IModelService.getLiveDocument();will return Live Document by accessing current object model of the Editor.
IModelService.getDocument();will return Document by parsing original source of content. In some cases, such as Web content with script, content will be changed in runtime, but this method always returns original DOM.
getLiveDocument() method enables to access Live-DOM of Internet Explorer through ACTF DOMByCOM (org.eclipse.actf.model.dom.dombycom).
if(element instanceof IElementEx) { IStyle style = ((IElementEx)element).getStyle(); backgroundColor = (String) style.get("backgroundColor"); .... }
getDocument() method parses original HTML source by using ACTF HTML Parser and returns the resulting DOM.