radioAe6rt

Archive for October 2008

Using xmllint to format xml

without comments

Long ago I used to use this utility with some frequency to pretty-print xml: xmllint, from the libxml2 project. I mention this here as much to remind myself how to use it as anything else.


$ export XMLLINT_INDENT=" "; xmllint --format foo.xml

where the environment variable XMLLINT_INDENT controls the indentation level. Two spaces are the default.

The utility is available without further ado on later versions of OS X, as well as on a number of Linux distributions, where I suspect it’s almost ubiquitous.

Written by radioae6rt

October 20, 2008 at 9:31 am

Posted in Internet

Tagged with

Configuring RESTlet’s via Spring

without comments

After help provided by my friends on the restlet.org mailing list, I successfully configured my restlet-based app via Spring. The unrelated parts of the Spring bean config have been removed for the sake of brevity.

To use this config, get a reference to the “server” bean and invoke its “start” method to start the server. The server bean has wired into it the restlet/resource routing information, so there is no need to explicitly refer or otherwise show concern for the “router” bean at the application level.

The app has a number of resources, with associated routes, all of which are easily identified.

Written by radioae6rt

October 20, 2008 at 9:19 am

Posted in Internet