How does one go about converting an XML object in PHP to a string that one can preform string functions on? Thanks. I am looking how to convert the entire object to a string as I do not have experience with xml parsing. Parsing the string for the little bit of data would be much easier for me.
Asked
Active
Viewed 75 times
0

atlas81887
- 175
- 1
- 1
- 7
-
5Possible duplicate of [SimpleXml to string](http://stackoverflow.com/questions/3690942/simplexml-to-string) – chris85 Jan 13 '16 at 22:47
-
@chris85 I am trying to convert the entire object to a string. No query then cast. Thanks – atlas81887 Jan 13 '16 at 23:21
-
_XML is a textual data format with strong support via Unicode_ so it is text before you load it into a simpleXML object. So just skip the simpleXML part completely. I wish you luck processing it as raw text. I think you will need it. You might find it quicker to learn some simpleXML. – RiggsFolly Jan 13 '16 at 23:37
-
Possible duplicate of [Forcing a SimpleXML Object to a string, regardless of context](http://stackoverflow.com/questions/416548/forcing-a-simplexml-object-to-a-string-regardless-of-context) – Ben Simmons Jan 14 '16 at 00:07