velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <>
Subject Re: wrapping XML document as JavaBeans?
Date Wed, 03 Oct 2001 01:59:10 GMT
On 10/2/01 9:43 PM, "David Rees" <> wrote:
>> You might also choose to build something path-ish so you can access any
>> level...
> Yep, you could easily do this using a HashMap so you don't have to write a
> custom container, just something to parse/store it:
> <object>
> <value>Data</value>
> <some>
>   <othervalue>MoreData</othervalue>
> </some>
> </object>
> object.get("value")
> object.get("some/othervalue")
> If you have elements with attributes with the same name as lower elements,
> things could get tricky, but that's a pooly designed XML spec anyway.  ;-)

I did this for JJAR.  I will pull that code out and see if I can package it

It used lists and maps... Pretty cheap and simple..

Geir Magnusson Jr.
System and Software Consulting
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." - Benjamin Franklin

View raw message