PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I as trying to write this XML using this code. The XML data comes from FLEX and is sent to the PHP code. The code writes to the file fine, but around the entire xml that was sent from flex, there are additional < /> around all of the data which caused my xml document to be in error. I'm pretty sure it's the add-root function in there but I don't know alot about PHP and have no idea on what to change it to.
Can you show the addroot function code. And try to stay away from using fifty thousand exclamation points. That has a tendency to turn people away from posts around here.
Sorry, add_root is in PHP as DomDocument->add_root
The code I used in the PHP is above. Basically, it works, except that it put everything between < and />.
So after the xmlData is passes to the PHP it turn out as
add_root is marked as deprecated.
The parameter you pass is the element's name, like in add_root('foobar') => <foobar></foobar>
You want domxml_open_mem or maybe domxml_open_file