Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9CF13200BBF for ; Mon, 14 Nov 2016 22:27:17 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9B79B160B06; Mon, 14 Nov 2016 21:27:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E6E88160AF4 for ; Mon, 14 Nov 2016 22:27:16 +0100 (CET) Received: (qmail 40109 invoked by uid 500); 14 Nov 2016 21:27:15 -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 40094 invoked by uid 99); 14 Nov 2016 21:27:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Nov 2016 21:27:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 24B48C18E1 for ; Mon, 14 Nov 2016 21:27:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.499 X-Spam-Level: * X-Spam-Status: No, score=1.499 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SORBS_SPAM=0.5] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id I5ricwhc6O_J for ; Mon, 14 Nov 2016 21:27:14 +0000 (UTC) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 02C865FB04 for ; Mon, 14 Nov 2016 21:27:13 +0000 (UTC) Received: from [192.168.178.20] ([88.65.150.210]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.167]) with ESMTPSA (Nemesis) id 0M1kaM-1cue7L1goE-00timL for ; Mon, 14 Nov 2016 22:27:09 +0100 Subject: Re: [configuration] Character position of key in file To: Commons Users List References: <915346ba-ce6e-866b-c9ad-67b82785a672@oliver-heger.de> <0e1b158f-f97b-e2b1-8d48-672e6409c7e4@pobox.com> <54A6C210-397F-4A75-B378-E34E168C42A7@pobox.com> From: Oliver Heger Message-ID: Date: Mon, 14 Nov 2016 22:27:15 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <54A6C210-397F-4A75-B378-E34E168C42A7@pobox.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:fxAjiHRyJZxCdviKDeC0KObeFJtJn3hLnLko0rMzkepAn4OkGA4 5RHNDlSQegx8IQvATTdkAITRyu4XJ7QbggjSBlb3xj8MXtf+YTOi6jsiRbfeS0LbMxFJV8H D45MOzolyRKJK04+SKLDDCgy+Pje8GFu8LN3a2q6QPIuyVQhPOHcUFlnES6tENdcWq2do46 hXbNI2oY2VHsijGbvoP3A== X-UI-Out-Filterresults: notjunk:1;V01:K0:9LBGuCvqlcY=:IZdYTD3qZgGeDdJ3kvmZB7 aPioyQErM0JjQvrOQAZ8S8U9pLo4frQO+OBxPLSLmyJ0tbG/B3dphtmIm5rKUKzRbL3uRWblk 3mRPOB3ORYoiqxRCIJm7c0KrI8nNY/kkB/pwR66R188jvvy7SUzSNUxG/E9WNPnw/nVPkdO5m FjidrMiRbSC87IC9XaxvEf1+qd8M0shH8VS0en+MQB5caET7gl2Xswv+ztebZlVKXrt12i64A StqfUEI+8Ul8alKBxrYJv3MwHYN73MiuNC1Lf6ExXe6qgCNb0biu8p2tRohtHFGlEArQGgO8/ uaLxMr2QNFhVv73ZeD7Q74aW9xfap6sCWPznCWx6VzPKfiB7CZNL78/7hv58s6ALVXhWiSDco E7n2FM8vktk281gEJlciYIlwj5h5vDHRINOIuCqoIh6mwrlvn7SD1H+KuAFaeedm+YbbRd6+z 0tGuInPXIsdWWdwp/x3belt6YnOiDUkcOKBL5NNMXDKaZWY1ENfAZmRwQZw4QF0Q4G+f7GHoJ 3EKlvIbX+tCx1fKUBSoBm9bQlB+GZK/KNC56R/GQ6WYaOofriYGiV3fnXIDUvDoAvWRQytMUh OqUcwmQrmnB/gRDxkachblEe8KxpLUrHK2Djyorn1VexqK9E4S5yuzXA1qplZaas8DYo3YeUL AaBlRgS4def0ql2rlnPAKIFwjvOoz//Ak4ZzI0/bMtQ3Qyv2nJoeVM2/Sm3XeGGqjNfc/B8YK XLvDRGMRywFhCjIz archived-at: Mon, 14 Nov 2016 21:27:17 -0000 Hi Greg, Am 14.11.2016 um 19:01 schrieb Greg Torrance: > I hope I'm not asking too many questions... > > I wonder if it is possible to determine the character/byte position of a particular key in a configuration file? No, the original position from where data is read is not stored in the resulting configuration. > > My intent is to do a pre-pass of an XML configuration file in which certain configuration keys/values are replaced by other keys/values. Once that is done the file will be reloaded. I realize this is possible outside of Commons Configuration, but I was wondering if there is a "hook" in the tool that might help simplify the process. > But wouldn't it be easier to do this with the Configuration API? Load the configuration, iterate over its keys, replace data as appropriate and save the result? Oliver > Thanks, > Greg > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org