高分在线求助XML解析
本帖最后由 HUENKE 于 2013-10-25 15:58:22 编辑
<br />
<?xml version="1.0" encoding="utf-8"?><br />
<nodes><br />
<node id="c5569e2c-0f4a-4ec2-86ba-736b79eca18c" name="A公司"<br />
type="0"><br />
<node id="4f2b55e9-e10a-496b-8bca-60e6f26daee5" name="部门1" type="1"><br />
<node id="363" name="叶子1" type="2" playurl="http://XXXXXXX363" /><br />
</node><br />
<node id="0c5ce42f-ba31-4b7a-8173-79ecae4a73ca" name="部门2" type="1"><br />
<node id="241" name="叶子1" type="2" playurl="http://xxxxx=241" /><br />
<node id="356" name="叶子1" type="2" playurl="xxxxxxxxx=356" /><br />
</node><br />
</node><br />
</nodes><br />
Copy after login
结构为 nodes下面有node下面还有node
我想做三重循环
foreach()
{
存公司名称
foreach()
{
存部门名称
foreach()
{ 存叶子名称}
}
}
请问我该怎么解析呢,
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 Articles by Author
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31