Current-Users archive

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

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

On 2012-01-22 19:30, David Young wrote:
On Wed, Jan 18, 2012 at 04:00:12PM -0500, Matthew Mondor wrote:
On Wed, 18 Jan 2012 14:27:10 -0600
David Young<>  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,  }


# 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

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

What do you mean by "dead-end"?

And the nice things about grep, sed, awk and so on is that they do not require a specific format, but just process anything text-like. They can be used for just about anything. xmltools can hardly be compared to that. xmltools deals with xml. xml is picky, strict and very restricted in its format. The total opposite of what grep, sed, awk and similar tools are (as well as traditional unix configuration files, which are also free text format files, more or less).


Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email:             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol

Home | Main Index | Thread Index | Old Index