users@jaxb.java.net

Re: marshal to dom

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 28 Jan 2003 07:25:16 -0800

> but node.getElementsByTagName(tagname) method returns null. I suspect
> XPathAPI methods such as selectNodes won't work either.
> The problem might be related to namespace prefix-jaxb adds a namespace
> xmlns:ns1 when namespace is not specified in schema. Don't know if
> node.getNamespace() work. How to call selectNodes and
> getElementsByTagName with an unknown namespace?

You should be using getElementsByTagNameNS. As a principle, your code
shouldn't be affected by prefix.

And W3C DOM doesn't have the selectNodes method. Which DOM are you
referring to?

regards,
--
Kohsuke KAWAGUCHI                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com