Re: Accessing DOM elements
Emiliano Heyns <[email protected]> Thu, 03 Apr 2003 15:33:39 +0200
| Newsgroups | gmane.comp.java.xwt.general |
|---|---|
| Message-ID | <[email protected]> |
Adam Megacz wrote:
>>><foo>
>>> bar
>>> <baz>
>>></foo>
>
> {$name:"foo" children:["bar", {$name:baz}]}
OK, so in my particular case would do:
<translations>
<main.title>Iris Advies Internet Surveys</main.title>
<accounts.title>Gebruikers</accounts.title>
<preferences.title>Instellingen</preferences.title>
</translations>
// this doesn't popup anything?
var translations = openFile("c:\trans.xml").getDOM();
titlebar = translations.children[0];
For neatness, I could have done
var transcache
for (i=0; i<translations.children.length; i++) {
// this doesn't look right
transcache[translations.children[i].name] = translations.children[i]
}
titlebar = transcache['main.title']
Close?
Emile
_______________________________________________
http://lists.xwt.org/listinfo/dev