XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Find all Namespace Declarations

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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS