Archive of UserLand's first discussion group, started October 5, 1998.

Scripting Unix at the CLI with XML-RPC

Author:Ken MacLeod
Posted:5/18/1999; 10:34:07 AM
Topic:Scripting on Linux
Msg #:6419 (In response to 6408)
Prev/Next:6418 / 6420

Netscape supports a limited set of commands through it's "netscape -remote" command line option. It'd be pretty slick if command line and GUI apps could be scripted with RPC commands, i.e. something like "netscape -xml-rpc" would begin taking XML-RPC requests on standard input and returning replies on standard output.

I created a demo app using the Perl Frontier::RPC module that serves the ``States'' XML-RPC demo from the command line.

This demo also has a unique feature that it accepts multiple requests on a single stream by using a sequence of characters that are otherwise illegal in XML to seperate the requests. That sequence is "--]]><<". This sequence is illegal because it both terminates any possible CDATA section and it has two `<' characters in a row. An illegal binary character could have been used instead, but that wouldn't be readable either.




This page was archived on 6/13/2001; 4:50:16 PM.

© Copyright 1998-2001 UserLand Software, Inc.