commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: Simple XML filter for Digester
Date Mon, 28 Jul 2003 22:50:17 GMT
hi Aaran

i'm afraid that i don't know of an easy way to do this (currently). the 
pattern matching rules don't look for attributes and anyway can't be 
easily modified dynamically.

this could probably be done using a filter for the SAX events (but that 
might be a little tough since you're new to xml). maybe some kind of 
generic filtering could be added to digester (but i'm not sure how easy 
this would be).

any one else have any good ideas about how to solve this one?

- robert

On Saturday, July 26, 2003, at 03:49 AM, Aaran Stent wrote:

> Hello,
>
> I am new to XML, after reading all of the hype I have fond disgester is a
> actually a practicle way of using XML in a "real world environment".  I 
> have
> setup a digester object to load select/combo boxes for my application.  A
> simple XML example follows:
>
> <combos>
> 	<combo name="colour">
> 		<option id="1" value="blue">
> 		<option id="2" value="black">
> 		<option id="3" value="red">
> 	</combo>
> 	<combo name="streets">
> 		<option id="1" value="street">
> 		<option id="2" value="court">
> 		<option id="3" value="road">
> 	</combo>
> </combos>
>
> This works fine, i can load all of the objects into a LinkedHashMap but I
> want to reuse the combo boxes witout having to clone objects.  I would 
> like
> to tell the digester to load just one object based on an attribute in a 
> tag.
> eg MyComboBoxClass colour = loadCombo("colour");
>
> I have read the article on the ibm website regarding using lucene
> (http://www-106.ibm.com/developerworks/library/j-lucene) but I did not ant
> to go to the trouble of building idexes on the hard drive.
>
> Thanks,
>
> Aaran
>
> ascc.net.au
> 2/6 Batman Rd
> Eltham Victoria 3095
> Australia
>
> www.ascc.net.au
> Tel: (03) 9431 6424
> Fax: (03) 3 9431 3684
> Mob: 0419 227 262
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


Mime
View raw message