News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1186279676:v:use_geshi-1:v:type-php

Started by Guest, Aug 05, 2007, 02:07 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Guest

parse_package('package-info.xml');
function parse_package($xml_loc)
{
   $package = new DOMDocument;
   $package->Load($xml_loc);
   /*if ($package->validate()) {
       echo "This document is valid!\n";
   }*/
   $elements = $package->getElementsByTagName('*');
   foreach ($elements as $element)
      echo $element->nodeName;
}