Hi Thomas, The JAXP 1.3 XPath API (javax.xml.xpath) [1] should meet your needs. Using this API, you provide your own namespace bindings by registering a NamespaceContext with an instance of an XPath.
[1] Xalan-J has an implementation of this API. [EMAIL PROTECTED] wrote on 10/05/2005 07:52:55 AM: > Hi, > > I have a problem with xpathes when I change my namespaces. msxml has > a method with which you can bind prefixes to namespaces. In every > xpath you can use the bound namespace prefix instead of the one used > in the document. In my case, I have some different sets of namespace > prefixes which can change. So the element <x:ELEMENTS> can be > <ELEMENTS> or <abc:ELEMENTS>, too. The correct namespace is always > defined in the XML document (like xmlns:x="http://...", xmlns="http://.. > ." or xmlns:abc="http://..."). > Is there an easy way to define a prefix at the start of parsing > (like xmlns:x="http://...") and use this prefix in all expressions > (like getElementsByTagName("x:ELEMENTS/x:CHILD/x:GRANDCHILD")), no > matter which prefix was used in the xml file. > > Best regards > > Thomas Barthel Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
