PHP-Klasse::XML2Array_xmlreader 24.09.2007

PHP-Klasse::XML2Array_xmlreader 24.09.2007

Kurzbeschreibung: Parse a XML document into an array

Veröffentlicht am: 24.09.2007

Gruppe(n):

  • PHP 5
  • XML

Beschreibung:

This class can be used to parse a XML document into an array.

It takes a XML document as a text string and parses it with the XMLReader class.

The class traverses the parsed document and builds an array with the names of the tags as keys.

Link: XML2Array_xmlreader


4 Responses to “PHP-Klasse::XML2Array_xmlreader 24.09.2007”

  • Wo liegt denn der Unterschied zwischen der Klasse und dem integrierten SimpleLoadXml? Mit letzerem habe ich gute Erfahrungen gemacht, vielleicht zu unrecht?

    Schöne Grüße und danke für den netten Blog, Paul

  • Naja, bei dieser Klasse bekommst du als Rückgabewert ein Array und bei __simplexml_load_string__ bzw. __simplexml_load_file__ bekommst du standarmäßig ein Objekt zurück.

    Moin moin

    PS: ich arbeite aber auch mit SimpleXML ;-)

  • ich hatte vor einiger Zeit auch mit dem XML Reader zu tun, weil ich eine Anwendung multiplattform läuffägih machen wollte. Ich habe vergeblich versucht selbst das xml Resultat in ein Array zu konvertieren. Ich weiß bis heue nicht, wieso es nicht geklappt, aber nun schaue ich mal ob die Klasse mir da ggf. weiterhilft, denn Arrays finde ich besser.

  • Thanks







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Blogroll

Lorem ipsum

These 3 boxes are widgets and can be edited through the admin page, just like the sidebar.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Impressum