[opencms-dev] Writing own collector

Carl Alex Friis Nielsen cfn at kb.dk
Wed Nov 22 10:58:40 CET 2006


-----Original Message-----
From: opencms-dev-bounces at opencms.org@KB On Behalf Of Thomas Kiesl
<thomas.kiesl at bluemars.net>

> i want to sorts XMLContent Resources by an date which is included in the 
> XML Content (a date field).
> Is there a default collector which can handle this or how can i access 
> the xml nodes of the XMLContent Resources :
> Are there any method or do i have to parse each binary data into a xml 
> document?

If you map the date to the collector.date property you can use the
allInFolderPriorityDateDesc or allInSubTreePriorityDateDesc collectors
to sort by that date - note that the collector.priority property must
be the same.

If this doesn't do it for you you have to write your own collector - you
might still want to map the date to some property so you don't have to
parse every resource during collection.

Cheers,

Carl



More information about the opencms-dev mailing list