![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: XPath and namespaces... >Thread Next - Re: still problems with XPath and namespaces... Re:still problems with XPath and namespaces...To: NULL Date: 1/3/2005 5:34:00 PM Hi, I'm still having troubles with XPath and namespaces. The XML I'm using looks like this: <SAMMLUNG xmlns:buch="http://www.example.com/buecher" xmlns:cd="http://www.example.com/cds"> <buch:ARTIKEL Status="vorhanden"> <buch:TITEL>The Marble Faun</buch:TITEL> <buch:AUTOR>Nathaniel Hawthorne</buch:AUTOR> <buch:PREIS>10.95</buch:PREIS> </buch:ARTIKEL> <cd:ARTIKEL> <cd:TITEL>Violinkonzerte 1, 2 und 3</cd:TITEL> <cd:KOMPONIST>Mozart</cd:KOMPONIST> <cd:PREIS>16.49</cd:PREIS> </cd:ARTIKEL> </SAMMLUNG> If I want to display e.g. all the CDs of Mozart, I would do something like this if I wouldn't have to deal with namespaces: string(//*/TITEL[following-sibling::KOMPONIST='Mozart']) My suggestion when dealing with namespaces would be something like this (but it doesn't work, as there is no TITEL-element anywhere, but I don't know how to get it in there): string(//*[local-name()='ARTIKEL' and namespace-uri()='http://www.example.com/cds']/*[string(local-name()='KOMPONIST') = 'Mozart']) Anyway, as I said before, that doesn't work. Could someone please help me with that? Thanks, Stefan | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
