[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Find all Namespace Declarations
- From: "K. W. Landry" <kwlandry@gmail.com>
- To: xml-dev@lists.xml.org
- Date: Mon, 18 Sep 2006 16:24:02 -0400
Folks,
After a couple of days of research and trying various things I'm hoping someone can point me in a definitive direction to solve the following:
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. 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.
The basic concept is simple, right? I thought so too but everything I've found comes down to a brute force parse of the document as a pre-process step. I thought I'd use getNamespaceDeclarations, etc..., but it also appears to come down to a brute force walk through the root attributes in a pushcontext/popcontext process. Of course, it's likely I'm just missing something, and therefore, this request for a clue, please.
Thanks,
KWL
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]