GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Wednesday, January 12, 2011

Presenting XML Document Using PHP

It's simple to present an xml document to browser using php:

<?php 
    header("Content-type: text/xml");
    $dom = new DOMDocument();
    $dom->load("index.xml");

    echo $dom->saveXML();
?>

The result can be manipulated using ajax as a responseXML property.
Share/Bookmark

No comments:

Post a Comment