Simple XML helpers? |
[eluser]Unknown[/eluser]
I was working on some simple XML functions today. I'm pulling data out of a database and wanted to easily be able to mash up some XML with that data, so I came up with the following: Code: <?php Basically, this code takes an associative array and turns it into a pretty XML string. It's extremely basic and lacks some important functionality, but I'm posting this here because it might be useful for someone. Here's an example of its usage: Code: <?php I think this would make a nice helper. It's not a full solution for all your XML needs, but it's a simple and handy solution in some cases.
[eluser]got 2 doodle[/eluser]
Excellent, I haven't tried it yet but I will use this! Thanks, doodle Welcome aboard!
[eluser]RaZoR LeGaCy[/eluser]
You can look into using Zend_Feed I merged two xml data arrays in to one.
[eluser]Colin Williams[/eluser]
And what's wrong with using SimpleXML? http://us2.php.net/simplexml
[eluser]Unknown[/eluser]
[quote author="Colin Williams" date="1214534773"]And what's wrong with using SimpleXML? http://us2.php.net/simplexml[/quote]Well, nothing, really, but this is even simpler. You could think of this as SimplerXML. |
Welcome Guest, Not a member yet? Register Sign In |