Home > Backend Development > PHP Tutorial > php 怎么把xml字符串转换为xml,求高手详解

php 怎么把xml字符串转换为xml,求高手详解

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:21:55
Original
2169 people have browsed it

php 如何把xml字符串转换为xml,求高手详解
我用file_get_contents()获取了一段xml字符串,怎么用转化为xml,看了很多文章,都是用simplexml_load_string();接下来该怎么做?

------解决方案--------------------
http://topic.csdn.net/u/20120229/17/2d8adf3f-5273-4330-a399-b67b5e395e3d.html
这个帖子的#17内容及关联内容。
具体就是:
1、将数组编译为xml字符串 dump_xml_config();
2、将xml字符串写入文件 file_put_contents_safe();
3、http://topic.csdn.net/u/20120228/09/cf787cd0-5936-4a15-9661-895f362b5b16.html
#10,将xml文件内容转换为数组 parse_xml_config()。
取你要用的就可以了。
------解决方案--------------------
simplexml_load_string();之后就是xml的dom了。接下怎么做,要问你接下来要干什么。
simplexml的操作:
http://www.w3school.com.cn/php/php_ref_simplexml.asp

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
objective-c - socket sends data in xml format
From 1970-01-01 08:00:00
0
0
0
How to parse and process HTML/XML in PHP?
From 1970-01-01 08:00:00
0
0
0
How to parse and process HTML/XML in PHP?
From 1970-01-01 08:00:00
0
0
0
How to parse and process HTML/XML using PHP?
From 1970-01-01 08:00:00
0
0
0
Update xml namespace with data from PHP form
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template