I was wondering whether someone knows of a simple php script that can read an xml file and parse in into an array. The xml file will not contain any attributes, so simply all the text between the tags has to be extracted and the names of the tags then become the array-keys.

An example of the xml file to be parsed:

<news>
<newsitem>
<id>1</id>
<title>This is title 1</title>
<abstract>This is the abstract of the newsitem</abstract>
<text>Here come's the full text</text>
</newsitem>
<newsitem>
<id>2</id>
<title>This is title 2</title>
<abstract>This is the abstract of the newsitem</abstract>
<text>Here come's the full text</text>
</newsitem>
</news>

I know of the DOM en SAX parsers, but I'd rather have a standalone script. Especially since I don't need all the functionality provided by DOM and SAX.

Does anyone know such a script, or can you provide any tips on how to create something like this myself?