-2

I am using simplexml_load_string for xml string interpreting to object from results of a REST API. It's working fine in my local server, which is using PHP5. But my hosting is in Yahoo and the service provider is giving me PHP4.

For that I need to change the way of interpreting XML string to object to another method, which I don't know how to do.

5
0

PHP4 did had a set of built in XML parsing functions. You start by creating instantiating a parser, then feeding it some data to be parsed, then running another function to extract the parsed data as something such as an array structure.

You will need to do a bit of porting to make this work as it is more complicated than the replacements introduced in PHP5, but it is workable.

That being said, your world would be a happier place and your customer would have a better product if you convince them to move to a host with PHP5. They are currently paying you to make something that will make their lives more difficult down the road, their product harder to maintain and thus more expensive, and exposing themselves to other unnecessary risks.

Not the answer you're looking for? Browse other questions tagged or ask your own question.