我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

从PHP生成XML

i need to generate XML structures on the fly using PHP. I've seen many different ways and libraries, but i would like to know which is the most efficient.

In general i have arrays and its content has to be returned as XML structure.

Thanks in advance.

Greetings ! c.

Most cpu/cycle efficient: probably if you build strings by hand. Most developer/time/clarity efficient: probably SimpleXML.

You can use this Array2XML class.

http://php.net/manual/en/book.simplexml.php

http://www.php.net/manual/en/book.xmlwriter.php

近期文章

  • Json返回字符
  • 在PHP字符串中使用'和'[关闭]
  • 正则表达式爆炸sql查询
  • 将HTML转换为ENML
  • 带有HTTP1.1的SQL插入
  • MySQL查询解析错误[关闭]
  • 嵌套动态PHP类
  • 工作流如何使用or()和endOr()查询个人任务和候选组任务
  • 求助 必须为元素类型 "foreach" 声明属性 "SEPARATOR"。
  • 关于Tomcat部署的网站提供下载资源
  • Ubuntu16.04下 convert_imageset.cpp编译和使用
  • IIS设置本地网页,访问时报错
  • do-while中break与continue
  • windows.print()实现的打印功能从打印预览返回时,模态框内的按钮点击无效?
  • TypeError: Cannot read property '_normalized' of undefined 大家有遇到這個問題嘛
  • 无法通过 SlingHttpServletRequest.getParts() 获取文件的 parts 在 junit test
  • 集合的pop,remove为什么出错
  • wdcp面板安装Nodejs网站怎么配置才能正常运行
  • 变量没有通过?
  • 如何使菜单激活

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华