Assuming you have C.U.D. on port 80 of 127.0.0.1, then you pass the parameter format=xml
http://127.0.0.1/cgi-bin/cud.py?format=xml&cluster=127.0.0.1&user=test&password=test&keyspace=test&cql=SELECT+*+FROM mytable
The response in raw is:
<?xml version='1.0' standalone='yes'?> <response> <status> <error_code>0</error_code> <error_description>Data returned Ok</error_description> <rows_returned>2</rows_returned> </status> <data> <row> <thekey>second</thekey> <col1>Carles Mateo</col1> <col2>http://blog.carlesmateo.com</col2> </row> <row> <thekey>first</thekey> <col1>Carles Mateo</col1> <col2>http://blog.carlesmateo.com</col2> </row> </data> </response>
The sample application on client_samples/php/sample_www_form.php provides a sample, and a graphical tool, to query the Cassandra Universal Driver using PHP and simplexml_load_file (or text/plain).
One thought on “Sample requesting XML with V.1.1”