Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

NetBSD, structured data, & the web (was Re: unreadable XML proplists from drvctl(8))



On Wed, Jan 18, 2012 at 04:00:12PM -0500, Matthew Mondor wrote:
> On Wed, 18 Jan 2012 14:27:10 -0600
> David Young <dyoung%pobox.com@localhost> wrote:
> 
> > Is JSON a human-readable alternative?
> > 
> > % drvctl -pn mainbus0 | xmlsed 
> > '//{(key/{text()})%((integer|string)/{text()})}' -1 '"$2": $3, ' | xmlsed 
> > -E '/{plist/dict/{*}}' -1 '{ $2 }'
> > { "device-driver": mainbus, "device-unit": 0x0,  }
> 
> Or:
> 
> # drvctl -pn mainbus0 | proplist-humanize
> {
>   
>   "device-driver" = "mainbus" 
>   "device-unit" = 0 
> } 

I can see the value of a tool like this, but I think that it brings us
to another dead-end when what we really need is new thinking.

I keep bringing the xmltools back into the discussion because they are
not a dead end.  Like the string-processing tools of old (grep, sed,
awk), the power of the xmltools and their user increase exponentially
with the number of tools.  A good set of XML tools lets us build
programs to process structured records and documents and to operate
on XML property lists and important data sources on the web: XHTML,
XML-based feeds (syndication, calendars, weather forecasts), and
documentation.

NetBSD is just treading water on the web.  It should be a motorboat.
xmltools are one of the boosts that it needs.

Dave

-- 
David Young
dyoung%pobox.com@localhost    Urbana, IL    (217) 721-9981


Home | Main Index | Thread Index | Old Index