PHP4 equivalent of SimpleXML?

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!

Moderator: General Moderators

Post Reply
kimberly
Forum Commoner
Posts: 31
Joined: Tue Apr 21, 2009 12:48 pm

PHP4 equivalent of SimpleXML?

Post by kimberly »

Hi, me again :banghead:

Can anyone plese tell me the PHP4 equivalent of the code below:
$result is my string returned from a server which contains XML that I need to parse.

Code: Select all

 
$xml = simplexml_load_string($result);
$xml = new SimpleXMLElement($result);
print "ErrorMessage ";
print ($xml->TxResponse[0]->ErrorMsg);
I basically just need to get the elements out of this XML string.

I'd really appreciate any help.

regards,
Kimberly
Last edited by Benjamin on Tue May 26, 2009 10:41 am, edited 1 time in total.
Reason: Added [code=php] tags.
Post Reply