W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1997

Usage of DOM Java ?

From: Laurent ROUVET <rouvet@cnam.fr>
Date: Fri, 26 Dec 1997 21:06:31 +0100
Message-ID: <34A40E46.F372BACC@cnam.fr>
To: www-dom@w3.org
I'm working on Java tools which handle documents from a browser.
I used DOM in order to make my tools independent of the browser.  

+-------+     +-----+---------+
| my    | <=> | API | browser |
| tools |     | DOM |         |
+-------+     +-----+---------+

To traverse the tree of a document HTML, I use a specific method to
get the root node and traverse the tree.
for example, if I want the TITLE Element:

  Object dc = myBrowser.getCurrentDocumentContext();
  Object title = ((w3c.dom.DocumentContext)dc).getDocument().
			getElementsByTagName("TITLE");

The systematic cast is painful, but it's possible.
But, how to create or to append a new node ?

I think if DOM wants to propose API for Java, it is necessary to 
include classes.  

This subject has been already discussed by Mark L. Fussell.
Can you light us? 


Laurent ROUVET.
Received on Monday, 29 December 1997 17:28:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:44 GMT