anoopK Posted February 25, 2008 Share Posted February 25, 2008 hai seniors there, i 'm new to php and xml... i need to convert a php class to an XML document and vice versa..i.e "to generate an xml document containing all the members of a class that is passed..eg,,if one membeer of a class is mr.x ,type name 001 type id then output xml doc must be <name>mr.x</name> <id>001</id>.. and pass this xml back to the calling func.. Also to perform the reverse task also ..ie generate a class from a php document.. I tried a lot,could not..very much thnkful if anyone could help.. Quote Link to comment Share on other sites More sharing options...
trq Posted February 25, 2008 Share Posted February 25, 2008 Post the code you have, with a description of your issue. Quote Link to comment Share on other sites More sharing options...
aschk Posted February 25, 2008 Share Posted February 25, 2008 Interesting question, i'd like to pose a question of my own. Why are you doing this? What do you wish to achieve? The reason I ask is that perhaps there's a better way of doing what you want without converting a PHP class to XML and vice versa. Quote Link to comment Share on other sites More sharing options...
anoopK Posted February 25, 2008 Author Share Posted February 25, 2008 dear sir,thanks for your response.. in fact,i m required to create an xml interface for testing purpose. at one end different test tools like ccm tools are plugged in..to inorder to allow a generic form, i require an xml interface. plesae let me know different methods to effect the conversion. Interesting question, i'd like to pose a question of my own. Why are you doing this? What do you wish to achieve? The reason I ask is that perhaps there's a better way of doing what you want without converting a PHP class to XML and vice versa. Quote Link to comment Share on other sites More sharing options...
aschk Posted February 25, 2008 Share Posted February 25, 2008 Sounds like you need SOAP. Read: http://uk.php.net/manual/en/function.soap-soapclient-construct.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.