title: converting xml DOMDocument to string
body: <p>HI i am using ajax for a web site which displays courses available,  i am having a problem where i am reading xml(which has courses details) getting node value(course name) comparing to my input(inout course name) if it is equal i am displaying the text(course description).
   now i am  tracing it getting to correct course name(in xml file) but while comparing it to input course name its not at all comparing so.at one point i loaded the xml file and echo it:</p>
  
  <pre><code>$doc-&gt;load('data/ICT.xml'); 
  echo"$doc";
  </code></pre>
  
  <p>It gives me an error </p>
  
  <blockquote>
    <p>Catchable fatal error: Object of class DOMDocument could not be converted to string in /home/students/....../www/htdocs/client/unit_details.php on line 23</p>
  </blockquote>
  
  <p>so what i understood from this is that xml dom object should be converted to string so that i can get required data and use it, is it true? if so can some one tell me how to do so please(like any functions etc) thanks in advance :-)</p>