Re: getElementById does not work on xml files

Michal Ceresna <[email protected]>
Newsgroups gmane.comp.mozilla.devel.java
Message-ID <200701231723.25270.michal.ceresna__23899.6469336145$1170093515$gmane$org@gmail.com>
On Monday 29 January 2007 5:43 pm, Sylvain Ferriol wrote:
Hello,

> if i try to select an element <foo id="toto" /> in
> getElementById("toto"), it do not work for xml file but it works if it
> is an html file
>
> strange, no ?
Most probably, your xml has some namespace defined.

Take a look at the Mozilla<->Java DOM bridge project at
http://mozdom4java.mozdev.org

We had the same issue there, and solved it with optional
ignoring of the namespaces.

best regards,
Michal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.