topical media & game development

talk show tell print

php cd



  q=_GET["q"];xmlDoc = new DOMDocument();
  xmlDoc->load("xml/xml-cd.xml");x=xmlDoc->getElementsByTagName('ARTIST');
  
  for (i=0; i<=x->length-1; i++)
  {
  //Process only element nodes
  if (x->item(i)->nodeType==1)
    {
    if (x->item(i)->childNodes->item(0)->nodeValue == q)
      { 
      y=(x->item(i)->parentNode);
      }
    }
  }
  cd=(y->childNodes);for (i=0;i<cd->length;i++)
  { 
  // echo("trying");
  //Process only element nodes
  if (cd->item(i)->nodeType==1)
    { 
    echo("");
    echo(strtolower(cd->item(i)->nodeName));
    echo("");
    echo(": ");
    echo(cd->item(i)->childNodes->item(0)->nodeValue);
    echo("
"); } } ?>


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.