commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip A Grim II" <>
Subject [digester] Trouble adding a list to a hash map
Date Fri, 01 Oct 2010 19:12:42 GMT
I'm having difficulty with the Digester when trying to add a list to a hash

The following is a portion of the XML I'm digesting:


<?xml version=\"1.0\" encoding=\"utf-8\"?>








        <Name>Most Recent Location</Name>

        <WKT>POINT (69.568583399873617 33.86775960347174 0)</WKT>






        <Name>Previous Location</Name>

        <WKT>POINT (66.53455434533617 32.863453455537174 0)</WKT>






The top level object is a HashMap that contains properties of the Person
tag.  Simple properties work fine, but nested properties such as Locations
are what are giving me trouble.  I am trying to create an ArrayList of the
Location tags which contains a HashMap of the properties nested inside each
Location tag, and that part works, but when I try to add that ArrayList to
the HashMap of person properties, I get an empty list.


Please note that I have no control over the format of the XML is
created by a third-party application, and I have to read what's there.


Attached is a simple code example that shows what I've tried to do.  Either
I'm doing it wrong or something isn't happening the way it should in the
Digester.  I'd appreciate any help you could offer.








Philip A Grim II
Chief Engineer
Data Tactics Corporation
7901 Jones Branch Dr.
Suite 240
McLean, VA  22102

Cell: (717) 880-1714

The information contained in this message may be privileged and/or
confidential and protected from disclosure.  If the reader of this message
is not the intended recipient or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender immediately by replying to this message and
deleting the material from any computer.


View raw message