Re: Accessing DOM elements

Adam Megacz <[email protected]> 03 Apr 2003 04:27:39 -0800
Newsgroups gmane.comp.java.xwt.general
Organization XWT
Message-ID <[email protected]>
Emiliano Heyns <[email protected]> writes:
> Or should I cycle through main.translations.children to find one
> with a name that matches 'main.title'?

Yes.

> That's going to be expensive (traversing the whole thing 
> every time I need a translation string)

The dom elements are writeable; you can cache stuff in the parent
node.

> and how do I access its content?

In XML, text sections are children; in other words:

<foo>
   bar
   <baz>
</foo>

foo has two children, bar and baz.  bar and baz are siblings.

  - a

_______________________________________________
http://lists.xwt.org/listinfo/dev