how can I parse xml data in php -
I am trying to figure out how it will work
for testing purposes , I have created two websites.
I'm calling a RAST service from each other
I pull XML data with file_get_contents
If I resonate it, then I would use a string data Can see
But how can I use simpelxml to remove data from nodes?
If I use simplexml_load_file ($ url), I get some error on which the XML declaration is starting from the document?
I have it in testfile
$ xml & lt; / h3 & gt; & lt; br & gt;"; ? & Gt;
This was XML I sent to.
I send it from a class file which I add to my PHP file above if I'm sure the web service has been called, maybe what to do with the announcement error ?
header ('content-type: text / xml'); Echo "& lt;? Xml version = \" 1.0 \ "? & Gt; \ n"; Echo "& lt; reaction & gt; \ n"; Echo "\ t $ status_code & lt; / status & gt; \ n"; Echo "t \ t Geen gt; \ n"; Echo "& lt; / response & gt;";
Thanks, Richard
Looks like an empty line At the top of the file, when it should start with the XML declaration, for example:
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt;
Comments
Post a Comment