[Qt-interest] XmlPatterns fustration
Jason H
scorp1us at yahoo.com
Tue Dec 28 18:08:51 CET 2010
Thanks, I'm tempted.
But a PHP.net style online documentation with user contributions would be the
best way by far to provide feedback for this. Expect to see JIRA issues for both
:-)
----- Original Message ----
From: "alessandro.portale at nokia.com" <alessandro.portale at nokia.com>
To: scorp1us at yahoo.com; htrannin at gmail.com
Cc: qt-interest at trolltech.com
Sent: Mon, December 27, 2010 5:01:29 PM
Subject: RE: [Qt-interest] XmlPatterns fustration
I'm glad that you found help.
Sounds like something which should be documented. You can help preventing the
next generation of XmlPatterns users from that frustration by creating a Jira
task for the missing documentation (or simply doing a gitourous merge request)
:)
________________________________________
From: qt-interest-bounces+alessandro.portale=nokia.com at qt.nokia.com
[qt-interest-bounces+alessandro.portale=nokia.com at qt.nokia.com] On Behalf Of ext
Jason H [scorp1us at yahoo.com]
Sent: Monday, December 27, 2010 21:28
To: Hildebrando Trannin
Cc: qt-interest at trolltech.com
Subject: Re: [Qt-interest] XmlPatterns fustration
Ah, the opposite of the QtSQL order :-/
Thanks.
________________________________
From: Hildebrando Trannin <htrannin at gmail.com>
To: Jason H <scorp1us at yahoo.com>
Cc: qt-interest at trolltech.com
Sent: Mon, December 27, 2010 3:08:09 PM
Subject: Re: [Qt-interest] XmlPatterns fustration
Jason,
you have to call bindVariable before setQuery method.
Hildebrando
On Fri, Dec 24, 2010 at 5:07 PM, Jason H
<scorp1us at yahoo.com<mailto:scorp1us at yahoo.com>> wrote:
I have a simple document:
<a><div class="x"></div></a>
Want to find "x" so I use /a/div/@class/string()
But my query does not work:
QBuffer device;
device.setData(sourceDoc.toUtf8());
device.open(QIODevice::ReadOnly);
QXmlQuery query;
query.setQuery("declare variable $inputDocument external;\r\n"
"doc($inputDocument)"+ path);
query.bindVariable("inputDocument", &device);
QString result;
query.evaluateTo(&result);
The above setQuery line gives me the error:
"No value is available for the external variable with name inputDocument."
When I change it to:
query.setQuery("doc($inputDocument)"+ path);
I get:
No variable with name inputDocument exists
So what am I oing wrong?
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com<mailto:Qt-interest at qt.nokia.com>
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list