Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 89200 invoked from network); 1 Oct 2010 19:13:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Oct 2010 19:13:39 -0000 Received: (qmail 68277 invoked by uid 500); 1 Oct 2010 19:13:38 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 68127 invoked by uid 500); 1 Oct 2010 19:13:38 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 68117 invoked by uid 99); 1 Oct 2010 19:13:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 19:13:37 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [205.178.146.57] (HELO omr7.networksolutionsemail.com) (205.178.146.57) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 19:13:27 +0000 Received: from cm-omr9 (mail.networksolutionsemail.com [205.178.149.5] (may be forged)) by omr7.networksolutionsemail.com (8.13.6/8.13.6) with ESMTP id o91JD3T6009244 for ; Fri, 1 Oct 2010 15:13:03 -0400 Authentication-Results: cm-omr9 smtp.user=pgrim@data-tactics.com; auth=pass (LOGIN) X-Authenticated-UID: pgrim@data-tactics.com Received: from [72.173.205.71] ([72.173.205.71:58309] helo=dtpg01) by cm-omr9 (envelope-from ) (ecelerity 2.2.2.41 r(31179/31189)) with ESMTPA id 2A/FC-02649-7B236AC4; Fri, 01 Oct 2010 15:13:03 -0400 From: "Philip A Grim II" To: Subject: [digester] Trouble adding a list to a hash map Date: Fri, 1 Oct 2010 15:12:42 -0400 Message-ID: <019801cb619c$a72c6c90$f58545b0$@com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0199_01CB617B.201ACC90" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: ActhnJ7h7i1Bwd3VRQyza5juRe3h8Q== Content-Language: en-us X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_0199_01CB617B.201ACC90 Content-Type: multipart/related; boundary="----=_NextPart_001_019A_01CB617B.201ACC90" ------=_NextPart_001_019A_01CB617B.201ACC90 Content-Type: multipart/alternative; boundary="----=_NextPart_002_019B_01CB617B.201ACC90" ------=_NextPart_002_019B_01CB617B.201ACC90 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I'm having difficulty with the Digester when trying to add a list to a hash map. The following is a portion of the XML I'm digesting: 3eca4cd1-a07a-4013-b4a3-1d6a6530f7e3 201007132112 20100803203509203 Most Recent Location POINT (69.568583399873617 33.86775960347174 0) 3e2462d1-a0c7-4013-4523-1345a3b8f7e3 201007100814 20100803203509203 Previous Location POINT (66.53455434533617 32.863453455537174 0) 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 itself...it 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. Thanks, Phil Philip A Grim II Chief Engineer Data Tactics Corporation 7901 Jones Branch Dr. Suite 240 McLean, VA 22102 Cell: (717) 880-1714 cid:1257801836.2381.12.camel@dt-pg.dt-pbj.org 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. ------=_NextPart_002_019B_01CB617B.201ACC90 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I'm having difficulty with the Digester when trying = to add a list to a hash map.

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

 

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

<Envelope>

  = <Person>

    = <Locations>

      <Location>

        <Id>3eca4cd1-a07a-4013-b4a3-1d6a6530f7e3</Id>

        <DateAsOf>201007132112</DateAsOf>

        <DateLastModified>20100803203509203</DateLastModified>=

        <Name>Most Recent Location</Name>

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

      </Location>

      <Location>

        <Id>3e2462d1-a0c7-4013-4523-1345a3b8f7e3</Id>

        <DateAsOf>201007100814</DateAsOf>

        <DateLastModified>20100803203509203</DateLastModified>=

        <Name>Previous Location</Name>

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

      </Location>

    = </Locations>

  = </Person>

</Envelope>

 

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 itself...it 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.

 

Thanks,

Phil

 

 

 

 

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

Cell: (717) 880-1714

3D"cid:1257801836.2381.12.camel@dt-pg.dt-pbj.org"

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.

 

------=_NextPart_002_019B_01CB617B.201ACC90-- ------=_NextPart_001_019A_01CB617B.201ACC90 Content-Type: image/jpeg; name="image001.jpg" Content-Transfer-Encoding: base64 Content-ID: /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAA2AIgDASIA AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3 ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3 uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD37OD1 rlPHl14nttDWTwpGJL/zlBUorDZznr+FS6to2u3WpzT2eqmC3bbsj8xhjCgHge+axNWs/EGkWf2m fWJHTcEwkjZyfrQ1cqEuV3tc4w638bu2nxfjDFSHW/jeBn+z4j7CGL/Gu+tdF8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HtbeOCG2vFjjUK o2qcAf8AAqbbeMNGtIvLht74JuLYIDck5PVvWiij65W/m/BB9Uo9vzHR+NNHiMhS1u1Mjbmwi8nA H972py+NtJR3dbe8Bc5b5V/+Kooo+uVv5vwQfVKPb8yIeL9FF612La985kCE4XGPpupZfF+izXEN xJa3hlhJMZwBjIwf4ufxooo+uV/5vwQfVaPb8xt/4z066065t44LoPLC6KWRcAkEc/NRRRXiZrVn UnFzd9D18tpRpwkoo//Z ------=_NextPart_001_019A_01CB617B.201ACC90-- ------=_NextPart_000_0199_01CB617B.201ACC90 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org ------=_NextPart_000_0199_01CB617B.201ACC90--