[PyQt] QXmlQuery example needed

David Boddie dboddie at trolltech.com
Tue Jun 22 17:38:47 BST 2010


On Tue Jun 22 07:03:51 BST 2010, Ruslan Popov wrote:

> 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:
>
>         out = QString()
>         query  = QXmlQuery()
>         query.setMessageHandler(handler)
>         q_str = 'doc("./uis/logic.xml")/logic/rule'
>         query.setQuery(q_str)

Have you tried using an absolute path instead of "./uis/logic.xml"?

David


More information about the PyQt mailing list