作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我想创建具有如下属性的 soapVars:
<tag attr="xxx">yyy</tag>
这是否可以通过 SoapVar 构造函数实现,但不使用 XSD_ANYXML 和原始 xml 字符串?
最佳答案
最好的方法是:
<?php
$tag['_'] = 'yyy';
$tag['attr'] = 'xxx';
$tagVar = new SoapVar($tag, SOAP_ENC_OBJECT);
?>
结果是:
<tag attr="xxx">yyy</tag>
关于php - 如何向 soapVars 添加属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2257973/
我是一名优秀的程序员,十分优秀!