Query XML format

Maximilian Kossick maximilian.kossick at googlemail.com
Sun Jun 1 21:44:14 CEST 2008


Hi
I committed some code today which creates a QueryMaker based on a XML
string. The idea is to store smart playlists in that xml format, and
provide a dbus method that takes the xml as input and returns the
results of the query, which would allows us to provide a powerful
scripting interface while removing the need to access the database
(oh, and will even work with collcetions that are not actually stored
in the database).

Ian asked me to put the XML format that I envision somewhere, so here
it is. Please note that this is still a rough draft, please feel free
to change it (i do not think that I'll find the time required to
finish this anytime soon)

<query version="1.0">
	<returnValues>
		<title/>
		<artist/>
		<album/>
		<playCount/>
	</returnValues>
	<filters>
		<or>
			<and>
				somefilters
			</and
			somefilters
	        </or>
	 </filters>
	 <onlyCompilations/>
	 <limit value="10"/>
	 <order field="title" value="ascending"/>
</query>

I have no idea how we could create this xml. There is no way to access
the state of a querymaker, and implementing a toXML() method for each
QueryMaker implementation would be way to much work. I'm not sure if
we need it anyway.

--Max


More information about the Amarok-devel mailing list