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
and add the following line to the file .htaccess
:
AddHandler cgi-script .pl