Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - getElementById >Thread Next - Re: getElementById Re: getElementByIdTo: NULL Date: 6/2/2006 2:14:00 PM
Marc Dzaebel wrote:
> using JDK1.6, is there a way to tell a Document (DOM Level 3) that a certain
> Attribute (usually "id") is always of type ID without defining a grammar
> file? Currently I have to traverse the full DOM tree and
> setIdAttribute("id", true). Otherwise getElementById returns null.
I don't know whether the parser you use supports that but xml:id could
help, see
<http://www.w3.org/TR/xml-id/>
That way you do not need a DTD or schema (but you need to use the
attribute name xml:id).
--
Martin Honnen
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
