Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 14972 invoked from network); 15 Jul 2008 20:41:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jul 2008 20:41:35 -0000 Received: (qmail 48021 invoked by uid 500); 15 Jul 2008 20:41:29 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 47530 invoked by uid 500); 15 Jul 2008 20:41:27 -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 47518 invoked by uid 99); 15 Jul 2008 20:41:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jul 2008 13:41:27 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of est.ergo.sum@gmail.com designates 74.125.92.150 as permitted sender) Received: from [74.125.92.150] (HELO qw-out-1920.google.com) (74.125.92.150) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jul 2008 20:40:34 +0000 Received: by qw-out-1920.google.com with SMTP id 5so240384qwf.60 for ; Tue, 15 Jul 2008 13:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=Z4VzAz9aZgeVE9ugXGXWCeWnj50Wl5HesqOJEUxWbKE=; b=k834uHbX+z7hAE58xRAXxRuQEMB0TLG+BHiARwuA/fJ2QZ5KMXTd5HZ8LBokQbXUFL Phxb8R2dFvqjXi8ZxpSF4xZSiwHg94A/h9le2J00jTsRXvk9XtEaZsXThp/aydStvjLS MrtlSYurBA2nC1x+1903DsZ7nZjiRmwSFN/Zc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=H+6diRgP9ZoHrClfkQ9scrAcKlnS+kKyzeDm4ibNrSkge1IyPAcJZ2aAEnytOjF+/H GWV1pTFzJjZAD7j+a74p55sFzgksChQP6mDNwPbm+tnlff6Zi1MO34oYOYv67jMxizUA XTE4K2lxQSATCZvVUHho47+ZbS1kKFQSrLf3Y= Received: by 10.142.212.19 with SMTP id k19mr4823036wfg.155.1216154457900; Tue, 15 Jul 2008 13:40:57 -0700 (PDT) Received: from ?192.168.0.176? ( [219.89.10.158]) by mx.google.com with ESMTPS id 27sm5831458wfa.2.2008.07.15.13.40.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 15 Jul 2008 13:40:57 -0700 (PDT) Message-Id: From: Michael Robinson To: Commons Users List Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v926) Subject: [Commons Configuration] Just One More Thing! Date: Wed, 16 Jul 2008 08:40:45 +1200 X-Mailer: Apple Mail (2.926) X-Virus-Checked: Checked by ClamAV on apache.org Hello again, I've spent some time with the test class, and managed to get to the =20 data I need. I still don't have any idea how to use =20 "config.getProperty("stringleadingtoproperty")" though. And thus, I suspect I will be unable to use =20 "config.setProperty("stringleadingtoproperty", "newproperty")"... This is what I used to find the data I need: ***CODE*** public void testNestedArray() { String key =3D "SandwichFillings"; Object array =3D config.getProperty(key); // root array assertNotNull("array not found", array); ObjectAssert.assertInstanceOf("the array element is not parsed =20= as a List", List.class, array); List list =3D config.getList(key); System.out.println(list.size()); assertFalse("empty array", list.isEmpty()); assertEquals("size", 1, list.size()); XMLPropertyListConfiguration o =3D =20 (XMLPropertyListConfiguration) list.get(0); Iterator k =3D o.getKeys(); while(k.hasNext()){ key =3D (String) k.next(); if(o.getProperty(key) instanceof String){ System.out.println(o.getString(key)); } System.out.println(); } } ***/CODE*** Output is: ***OUTPUT*** 1 self html Original High Default SIDE TITLE utf-8 ***/OUTPUT*** When I saw that I almost cried, I was so happy. So my question now is, what string would one use to access SIDETITLE =20 directly? It is in a Dictionary, which is in an Array - the property of =20 SandwichFillings. I've tried a few strings, but I don't really know the syntax, or what =20= is possible so it's like stumbling around in the dark. Could someone please let me know how I am able to 1) access this data, =20= 2) change the value. Thank you for your time and patience, Mike One thing is for sure, Vista isn=92t the answer. =97 Posted by Fenton=20= --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org