<br><br><div class="gmail_quote">On Feb 19, 2008 8:54 AM, Jean-Paul Calderone <<a href="mailto:exarkun@divmod.com">exarkun@divmod.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, 19 Feb 2008 12:29:38 +0100, Gabriel Rossetti <<a href="mailto:mailing_lists@evotex.ch">mailing_lists@evotex.ch</a>> wrote:<br>> [snip]<br><div class="Ih2E3d">>Ok, I've got some code sort of working, if I use the following XPathQuery<br>
>string : "/*" on the following XML string :<br>><br>><?xml version="1.0" encoding="utf-8"?><br>><test><feed name="test">toto</feed></test><br>
><br>>the addObserver works ( xs.addObserver("/*", self.onTest) )<br>>but if I try the following :<br>><br>><br>>xs.addObserver("/test/feed/@name", self.onTest)<br>>or<br>>xs.addObserver(xpath.XPathQuery("/test/feed/@name"), self.onTest)<br>
><br><br></div>I don't think the xpath implementation in xish is complete. You may<br>have found a bug or a case it doesn't handle.<br><font color="#888888"></font></blockquote><div><br>It is not complete. But if you would like to find the stanza 'feed' with the attribute 'name' then it would like like<br>
<br>xs.addObserver("/test/feed[@name]", self.onTest)<br><br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font color="#888888"><br>
Jean-Paul<br></font><div><div></div><div class="Wj3C7c"><br>_______________________________________________<br>Twisted-Python mailing list<br><a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br></div></div></blockquote></div><br>