今天在PHP4环境下重新写一个接口程序,需要大量分析解析XML,PHP的xml_parse_into_struct()函数不能直接生成便于使用的数组,而SimpleXML扩展在PHP5中才支持,于是逛逛搜索引擎,在老外的网站上找到了一个不错的PHP XML操作类。

一、用法举例:
1、将XML文件解释成便于使用的数组:


data.xml文件:


利用该XML操作类生成的对应数组(汉字编码:UTF-8):


2、将数组转换成XML文件:


二、PHP XML操作类源代码:





技术大类 » PHP/JS/Shell | 评论(42) | 引用(0) | 阅读(94443)
cxf0401
2012-6-11 10:39
Welcome to our sunglasses wholesaleonline sales shop, where you can always buy the most affordable price to a your favorite discount designer sunglasses.discount sunglassesart and technology with a smooth edge of attitude for your active lifestyle. Engineered for those who understand that style is something define for yourself.
coach88888888 Email
2012-8-13 17:28
Coach Factory Outlet offer excellent, elegant coach products in order to generate room for your new collections.They're purchased more quickly that you may at any time imagine.Most significantly, the coach designer purses of Coach Factory Online industry won't deteriorate your individual fashions at all. Rather they would immediately change your overall looks marvelously.I find it all very odd But this is no different than Coach Outlet Online any other company that has an outlet presence and really doesn’Coach Outlet Store t explain it to the customer.By the fashion, novel appearance, sophisticated technology, superior quality, Coach Outlet won domestic and international customers, their products exported to the Middle East, Southeast Asia and other regions.
GQWE
2013-1-29 17:32
买轴承就到:www.jkzhoucheng.cn
aa Email Homepage
2013-4-19 21:28
http://www.cloudstec.com 外贸建站
bb Email Homepage
2013-4-19 21:29
云轩网络外贸外包,网站开发。 www.cloudstec.com 有需要联系我。 QQ1305929430
bb Email Homepage
2013-4-19 21:29
外贸建站开发,外贸。门户网开发。[url=http://www.cloudstec.com][/url]
jack
2015-1-8 17:36
解决了实际业务中的一个小问题 十分感谢分享
shz Email
2022-6-29 19:33
It was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing.  online dealings
shz Email
2022-6-29 19:39
I am a new user of this site so here i saw multiple articles and posts posted by this site,I curious more interest in some of them hope you will give more information on this topics in your next articles.  online dealings
shz Email
2022-6-29 19:45
I have bookmarked your website because this site contains valuable information in it. I am really happy with articles quality and presentation. Thanks a lot for keeping great stuff. I am very much thankful for this site.  online dealings
shz Email
2022-6-29 19:54
First You got a great blog .I will be interested in more similar topics. i see you got really very useful topics, i will be always checking your blog thanks.  online dealings
shz Email
2022-6-29 20:08
Hi to everybody, here everyone is sharing such knowledge, so it’s fastidious to see this site, and I used to visit this blog daily  online dealings
shz Email
2022-8-27 22:50
Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates.  HostPapa
shzz Email
2022-8-27 22:52
I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy.  iPage
shz Email
2022-8-27 22:52
Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share.  HostPapa
shz Email
2022-8-27 22:55
Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained!  Interserver
shz Email
2022-8-27 22:58
I see some amazingly important and kept up to length of your strength searching for in your on the site  Interserver
shzz Email
2022-8-27 23:00
I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy.  InMotion
shz Email
2022-8-27 23:00
Hi buddies, it is great written piece entirely defined, continue the good work constantly.  Interserver
分页: 2/3 第一页 上页 1 2 3 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]