mozdev.org

mozdom4java

resources:

For using the mozdom4java connector you need to obtain from Mozilla an instance of the nsIDOMNode class, for example nsIDOMDocument. Then our code can be used to wrap that Mozilla node into a standard W3C DOM node.

The easiest way is to use the SWT/Browser widget from the Eclipse/ATF project. The whole ATF project is not needed, the browser widget can be easily separated and used in a standalone SWT application. The MozillaBrowser class has a method called getDocument() that returns the currently loaded nsIDOMDocument.

To avoid SWT, you can implement a mini Mozilla embedding application as described in JavaXPCOM documentation. Then a nsIDOMDocument instance can be obtained from nsIWebNavigation.

Once a nsIDOMNode instance is available the following code constructs are applicable:

For questions or comments about mozdom4java, please send a message to the mozdom4java mailing list.
Copyright © 2000-2006. All rights reserved. Terms of Use & Privacy Policy.