Converting Form Data to XML

橙三吉。 提交于 2019-12-23 04:53:32

问题


I'm using PHP in my contact form to send an email to but I need the output to be emailed in XML format. How do I convert the form data to XML? I tried looking around for this but the only helpful information I could find was for ASP. Thanks!


回答1:


http://ie.php.net/manual/en/book.simplexml.php - should have you up and running in no time.




回答2:


I prefer XMLWriter, works great in my RSS parsers.

For a more detailed help, you need to be more specific in your question.




回答3:


Why do you need to send it as XML? and how does it need to be sent?

you can loop through your post variables and create xml items for each post variable.



来源:https://stackoverflow.com/questions/5097810/converting-form-data-to-xml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!