[Home] [By Thread] [By Date] [Recent Entries]
* K. W. Landry wrote:
>Given a java-based DOM implementation (any flavor you think best suited,
>ie.jdom, dom4j, etc....), the process must, when presented with any DOM of
>unknown content, print out all namespace declarations and their prefixes as
>defined at the root.
That's iterating over the .attributes collection checking the namespace-
URI fields of the Attr nodes in the process. Trivial in a conforming im-
plementation.
>For extra credit, any suggestions to recognize any
>attributes of any child element in a random walk through a DOM that are
>prefixed by any of the namespaces thus defined in the root.
I don't understand this requirement. What should it do for
<foo xmlns:bar="x">
<foo xmlns:bar"y">
<foo bar:baz="..." xmlns:x="x" x:z='...'/>
</foo>
</foo>
?
--
Björn Höhrmann · mailto:bjoern@h... · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |

Cart



