From owner-freebsd-arch@FreeBSD.ORG Fri Jul 25 06:54:12 2014 Return-Path: Delivered-To: arch@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 958C6A5E; Fri, 25 Jul 2014 06:54:12 +0000 (UTC) Received: from mail.0x20.net (mail.0x20.net [217.69.76.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EF9C2B36; Fri, 25 Jul 2014 06:54:12 +0000 (UTC) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id 830DC6A6005; Fri, 25 Jul 2014 08:54:10 +0200 (CEST) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.7/8.14.7) with ESMTP id s6P6sAwU049006; Fri, 25 Jul 2014 08:54:10 +0200 (CEST) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.7/8.14.7/Submit) id s6P6s8CF048014; Fri, 25 Jul 2014 08:54:08 +0200 (CEST) (envelope-from lars) Date: Fri, 25 Jul 2014 08:54:08 +0200 From: Lars Engels To: Simon Gerraty Subject: Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML Message-ID: <20140725065408.GB10844@e-new.0x20.net> References: <20140725044921.9F0D3580A2@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jho1yZJdad60DJr+" Content-Disposition: inline In-Reply-To: <20140725044921.9F0D3580A2@chaos.jnpr.net> X-Editor: VIM - Vi IMproved 7.4 X-Operation-System: FreeBSD 8.4-RELEASE-p4 User-Agent: Mutt/1.5.23 (2014-03-12) Cc: sjg@freebsd.org, arch@freebsd.org, marcel@freebsd.org, phil@juniper.net X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 06:54:12 -0000 --jho1yZJdad60DJr+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 24, 2014 at 09:49:21PM -0700, Simon Gerraty wrote: > Hi, >=20 > At a vendor summit a few years ago I asked about whether anyone but us > (Juniper) would be interested in the ablity to have standard BSD apps > output XML. >=20 > I was actually surprised by the amount of interest expressed. > I've occasionally nagged our UI team ever since for a clean and simple > API that we could contribute to address this. >=20 > We now have a what I think is a viable candidate > and we'd like to take the next steps towards contributing it and > converting at least a few apps. >=20 > Not only does it handle TXT and XML output but JSON and HTML as well, > and very rich HTML at that. > With some slick javascript - you can do amazing things with the level of > detail you can get out of this sort of thing. >=20 > The API is of necessity a bit more complex than just printf(3). > Considering the level of functionality available though it is a good > tradeoff. >=20 > The main open issue (assuming this functionality is still desired) is > support of wide charachters. >=20 > We figure the worst case solution is a sed(1) script to generate the wide > version of the API from the normal one, but perhaps simply always using > UTF8 would be a better solution? >=20 > Thanks > --sjg FYI: There's also a Summer of Code project to handle the same: https://wiki.freebsd.org/SummerOfCode2014/MachineReadableFromUserlandUtils But I think that one mainly handles JSON output. Lars --jho1yZJdad60DJr+ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJT0f8QXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RjQwMDE3RTRERjUzMTI1N0FGRTUxNDlF NTRDQjM3RDNBMDg5RDZEAAoJEOVMs306CJ1tMfQH/1wGzxwO9YENOq7UDGkDxQ5T yFKk5M66FIc+5H1XfXxUvKm7KSNTwToAaQvrXDzNJQzUhlBOkYQIXLLIm6cqnS21 T6YIzY+iAwlzmSgzzJjZmvZYs+8po42VJDyXbCyj/vcmE2hO67m18mjZumROwhTm Ss/IDuecISS39KcWizxP4anhC+wGxUnBSKU6+slLtqInIxNrUhn6bL4rRkgVhazA CrVFFYCAO7MZK0Isx68BuNvcvInpQJUwN+JlGG5yhCMrYTicCVlQpPj10tDCCd9r v8pfjj+8FvruiY1OpcPUOqJ0N2i/gIGv4NE4tnnD7NuczLyBglXyDF+MhVoswyI= =QktG -----END PGP SIGNATURE----- --jho1yZJdad60DJr+--