Hi all,<br><br>Can someone explain me how to use QXmlQuery. I have simple XML file on the filesystem and I need to get one piece of it. My code following:<br><br><span style="font-family: courier new,monospace;">        out = QString()<br>
        query  = QXmlQuery()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        query.setMessageHandler(handler)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        q_str = &#39;doc(&quot;./uis/logic.xml&quot;)/logic/rule&#39;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        query.setQuery(q_str)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"><br>        if not query.isValid():</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">            print &#39;not valid&#39;</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        if not query.evaluateTo(out)</span>:<br><span style="font-family: courier new,monospace;">            print &#39;not evaluated&#39;<br>
<br></span>It shows me &#39;not evaluated&#39; for:<br><span style="font-family: courier new,monospace;"><br></span><span style="font-family: courier new,monospace;">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>
&lt;logic name=&quot;card_types&quot; version=&quot;1.0&quot;&gt;<br>  &lt;rule name=&quot;flyer&quot;&gt;<br>    &lt;sequence/&gt;<br>  &lt;/rule&gt;<br>  &lt;rule name=&quot;test&quot;&gt;<br>    &lt;sequence&gt;<br>      &lt;dialog type=&quot;list&quot; name=&quot;category&quot;/&gt;<br>
    &lt;/sequence&gt;<br>  &lt;/rule&gt;<br>&lt;/logic&gt;<br><br></span>-- <br>Ruslan Popov<br>phone: +7 916 926 1205<br><br>