From owner-freebsd-stable@FreeBSD.ORG Thu Dec 12 06:21:46 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0987AD6 for ; Thu, 12 Dec 2013 06:21:46 +0000 (UTC) Received: from isis.morrow.me.uk (isis.morrow.me.uk [204.109.63.142]) by mx1.freebsd.org (Postfix) with ESMTP id A2D851FF7 for ; Thu, 12 Dec 2013 06:21:46 +0000 (UTC) Received: from anubis.morrow.me.uk (host86-140-233-167.range86-140.btcentralplus.com [86.140.233.167]) (Authenticated sender: mauzo) by isis.morrow.me.uk (Postfix) with ESMTPSA id 592DF4508D for ; Thu, 12 Dec 2013 06:16:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 isis.morrow.me.uk 592DF4508D DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=morrow.me.uk; s=dkim201101; t=1386828983; bh=hLlkB3F25zzqjfFU4I/Eh+hwKzonMIg8uZgEAAHqRmQ=; h=Date:From:To:Subject:References:In-Reply-To; b=av1KkhzOWixXbzzwIgMa7z12qw9DKwMZZVyPdilF0Oz7QKgnFsTs87BoWIhiwhVYm Sxd/gvdzAsnQr97ZaRjtNkxtvwIxdaKaYZfny+z+01wJ6Zi056KKvWclY6J/KO3vqr b61/lvUQc7IFK5fcdeibwjr6DdGu8+sy+2mH9Ia8= X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.98 at isis.morrow.me.uk Received: by anubis.morrow.me.uk (Postfix, from userid 5001) id BC352F2B1; Thu, 12 Dec 2013 06:16:19 +0000 (GMT) Date: Thu, 12 Dec 2013 06:16:19 +0000 From: Ben Morrow To: freebsd-stable@freebsd.org Subject: Re: BIND segway -> python -> first-class ports Message-ID: <20131212061615.GA28292@anubis.morrow.me.uk> References: <622122.74675.bm@smtp120.sbc.mail.gq1.yahoo.com> <20131210224915.GA55638@funkthat.com> <52A82099.9080100@bluerosetech.com> <0EC3A50D-A6BE-4F3B-87D6-AB0470F0BA64@gsoft.com.au> <4174A92E-F202-4FFB-BFED-C38A9D0A7F91@fisglobal.com> <0D92E13A-F869-492C-852B-37A0BFB1674C@gsoft.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <38856510-A2D9-41E6-8CDC-ED282BDA933A@gsoft.com.au> X-Newsgroups: gmane.os.freebsd.stable User-Agent: Mutt/1.5.22 (2013-10-16) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 06:21:46 -0000 Quoth "Daniel O'Connor" : > > On 12 Dec 2013, at 12:24, Teske, Devin wrote: > >> Thanks, if only I'd know about this 6 months ago :) > > > > I just wrote it from scratch, so didn't exist until today ;D > > Hah nice, although I imagine there is plenty of legal XML it can't parse. > > That plays to another point about this sort of work - it's very hard to > write shell script that will work properly in all cases (things like > spaces, or even newlines and unprintable characters in filenames). While I wouldn't want to encourage the idea of standardising on XML, libbsdxml (a copy of expat) is present in base, so it would be straightforward to write a small utility which parsed XML entirely correctly and extracted some requested information into shell variables. (It would have to emit shell to be evalled, of course, just as getopt(1) does.) It would also be possible to extend, say, awk to handle XML natively. Ben