Programmer's Guide to the wftk: list XML
[ wftk documentation home ]
[ wftk programmer's guide home ]
Lists, and by extension queries, are represented rather simply in the wftk: they consist of an
XML element of type "list" which contains any number of arbitrary elements as contents. A query
is performed by creating a list structure (using xml_create),
possibly setting some attributes to restrict the search, and passing it to the appropriate wftk
function. The library will perform your query (for example, for the tasks active in a given process)
and will add elements to the list which represent the result set.
The list structure is thus very much like a RecordSet in the Microsoft world.
To read the contents of a list structure, iterate along it using xml_firstelem
A typical list is a list of tasks returned by wftk_task_list. It
might look like this (except that I've indented it conveniently, which the wftk won't do):
<task id="4" user="bob" label="Process application" role="Tech Support"/>
<task id="6" user="sue" label="Check consistency" role="Purchasing"/>
Copyright (c) 2001 Vivtek. Please see the licensing
terms for more information.