本文介绍了在PHP4中用于XML解析/读取的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不幸的是,我必须在PHP4服务器上的较旧的Web应用程序中工作;现在,它需要解析很多XM L来调用webservices (custom protocol, no SOAP/REST);

Unfortunatly I have to work in a older web application on a PHP4 server;It now needs to parse a lot of XML for calling webservices (custom protocol, no SOAP/REST);

PHP5下,我将使用SimpleXML,但这不可用.PHP4中有Dom XML,但PHP5中已不再是默认值.

Under PHP5 I would use SimpleXML but that isn't available;There is Dom XML in PHP4, but it isn't default any more in PHP5.

还有哪些其他选择?我正在寻找一种在PHP5迁移后仍然可以使用的解决方案.

What are the other options?I'm looking for a solution that still works on PHP5 once they migrate.

如果可以使用架构验证XML,那就更好了.

A nice extra would be if the XML can be validated with a schema.

推荐答案

有一个SimpleXML反向端口可用: http://www.ister.org/code/simplexml44/index.html

There is a simpleXML backport avaliable: http://www.ister.org/code/simplexml44/index.html

如果可以安装,那将是最好的解决方案.

If you can install that, then that will be the best solution.

这篇关于在PHP4中用于XML解析/读取的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 19:05