<br><br><div class="gmail_quote">On Feb 19, 2008 8:54 AM, Jean-Paul Calderone &lt;<a href="mailto:exarkun@divmod.com">exarkun@divmod.com</a>&gt; 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 &lt;<a href="mailto:mailing_lists@evotex.ch">mailing_lists@evotex.ch</a>&gt; wrote:<br>&gt; [snip]<br><div class="Ih2E3d">&gt;Ok, I&#39;ve got some code sort of working, if I use the following XPathQuery<br>
&gt;string : &quot;/*&quot; on the following XML string :<br>&gt;<br>&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&gt;&lt;test&gt;&lt;feed name=&quot;test&quot;&gt;toto&lt;/feed&gt;&lt;/test&gt;<br>
&gt;<br>&gt;the addObserver works ( xs.addObserver(&quot;/*&quot;, self.onTest) )<br>&gt;but if I try the following :<br>&gt;<br>&gt;<br>&gt;xs.addObserver(&quot;/test/feed/@name&quot;, self.onTest)<br>&gt;or<br>&gt;xs.addObserver(xpath.XPathQuery(&quot;/test/feed/@name&quot;), self.onTest)<br>
&gt;<br><br></div>I don&#39;t think the xpath implementation in xish is complete. &nbsp;You may<br>have found a bug or a case it doesn&#39;t handle.<br><font color="#888888"></font></blockquote><div><br>It is not complete. But if you would like to find the stanza &#39;feed&#39; with the attribute &#39;name&#39; then it would like like<br>
<br>xs.addObserver(&quot;/test/feed[@name]&quot;, self.onTest)<br><br><br>&nbsp;</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>