PHP Classes

Node lists

Recommend this page to a friend!

      DOMIT XML parser  >  All threads  >  Node lists  >  (Un) Subscribe thread alerts  
Subject:Node lists
Summary:Can't get number of node lists as arrays
Date:2009-07-14 21:19:04

  1. Node lists   Reply   Report abuse  
Picture of Shillo Shillo - 2009-07-14 21:19:04
I have this xml file:
<name>Latest News</name>
<description>Shows the latest news of the system.</description>
<copyrights>2009 Team Kiwi</copyrights>
<param name="amount" value="2" />
<param name="cache" value="false" />
<param name="publish_date" value="Now()" />

And this php code:
$instance = &new DOMIT_Document() ;
And when I try to do this:
$files = &$instance->getElementsByPath( "/Module/filelist/file", 0 )->toArray() ;

This works if i put in the parameter 'nodeindex' the argument '1'.
But I'm interested of having the all file tags which are under the filelist tag and convert to array, or at least to a sorted node list so I can loop them.