
Shillo - 2009-07-14 21:19:04
I have this xml file:
<Module>
<name>Latest News</name>
<description>Shows the latest news of the system.</description>
<author>Facile</author>
<version>1.0</version>
<link>www.facile.co.il</link>
<copyrights>2009 Team Kiwi</copyrights>
<filelist>
<file>bulbul.php</file>
<file>tpl.php</file>
</filelist>
<paramlist>
<param name="amount" value="2" />
<param name="cache" value="false" />
<param name="publish_date" value="Now()" />
</paramlist>
</Module>
And this php code:
$instance = &new DOMIT_Document() ;
$instance->loadXML('somepath.xml');
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.
Thanks,
Shillo.