tag:blogger.com,1999:blog-6964481166108300024.post-48443797635244865842007-06-25T17:15:00.000+01:002007-06-25T17:21:59.052+01:00A clarification on querying<span style="font-weight: bold; font-style: italic;">Note:</span> This post is a slightly blogified version of a comment I left to my mentor's comment to my last post. Also note that that sentence is awful. ;)<br /><br />Yes, I shall be using QtXml module most likely with the SAX2 style variant being the most likely. (I've looked at <a href="http://doc.trolltech.com/4.3/qxmlstreamreader.html">QXmlStreamReader</a> as it can parse an incomplete bytearray so we don't <span style="font-style: italic;">need</span> the full XML before parsing.)<br /><br /><span style="font-weight: bold;">2 step process:</span><br />When <a href="http://www.linux-foundation.org/en/OpenPrinting/Database/Query">querying openprinting.org</a>, there are 3 types of information we can retrieve (using the type argument/option):<br /><ul><li>manufacturer (I likely won't use this)</li><li>printer</li><li>driver<br /></li></ul>So, in order to find and download a specific driver for a specific printer, there necessitates 2 queries.<br /><br />The first query gets information from machine (and perhaps the user) about the printer type. This will also give lots of information about drivers available for the printer (there could even be a list of many recent, functional drivers that could all "work").<br /><br />The second query will use this driver list (so we need the first query's XML parsed before we can make the second) and make a driver query. Here we can get information about the driver such as the all important download URL.Gavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.com