NAME

daia - Simple DAIA parser and converter as command line client or CGI script

DESCRIPTION

You can pass either an URL which will be queried, or a string of serialized DAIA. The serialization format (JSON or XML) can be specified or it will get guessed. You can use this as a proxy to convert serialization format or just show the result in HTML - in this case you can also validate DAIA/XML against the XML Schema.

COMMAND LINE USAGE

To get usage information call this script with -?, -h or --help as only parameter. Options can be passed as key=value pairs and the first parameter is treated as filename or URL to read from (use '-' for STDIN as set by default).

daia input.xml  out=json  # convert to DAIA/JSON (default)
daia input.json out=xml   # convert to DAIA/XML

CGI USAGE

Put this script in a directory of your webserver where it is executed as CGI script. You may have to change its filename to daia.pl or add a symlink or create a RewriteRule. In addition you may have to add the following lines to .htaccess:

Options +ExecCGI           # unless script is located in a cgi-directory
AddHandler cgi-script .pl  # unless this handler is already enabled
SetEnv PERL5LIB ../lib     # pointer to DAIA library (if it is not installed)

VERSION

Have a look for the $VERSION variable in the source code of this script.