如何使用PHP读写XML DOM [英] How to read and write the XML DOM with PHP

查看:53
本文介绍了如何使用PHP读写XML DOM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,

我正在使用PHP阅读和编写XML DOM文件。

我的XML文件是这种格式

展开 | 选择 | Wrap < span class =codeDivider> | 行号

解决方案

< blockquote>你有什么问题?


选项1? PHP:DOMDocument - Manual

(特别是loadXML) ()和save()方法,使用标准DOM函数完成XML操作)


选项2? PHP:SimpleXML - Manual

(适合阅读简单xml文件)


选项3? PHP:XSL - 手册

(应用所有更改)一个,需要XSLT知识(一些))


问候


我的问题是如何使用以下方式读取和编写上述格式化的XML文件PHP,编辑特定的现有记录并删除。


Hey,
I am working on reading and writing the XML DOM File using PHP.
My XML File is In this Format

Expand|Select|Wrap|Line Numbers

解决方案

What problem are you having?


option 1 ? PHP: DOMDocument - Manual
(esp. the loadXML() and save() methods, XML manipulation is done with the standard DOM functions)

option 2 ? PHP: SimpleXML - Manual
(good for reading simple xml documents)

option 3 ? PHP: XSL - Manual
(applying all changes in one go, XSLT knowledge (some) required)

regards


My Problem is that how can i read and write the above formatted XML file using PHP, edit the specific existing record and delete.


这篇关于如何使用PHP读写XML DOM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆