使用SOAP来生成PHP的XML属性 [英] Using SOAP to generate XML attributes in PHP
本文介绍了使用SOAP来生成PHP的XML属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要生成以下XML与SOAP:
I need to generate the following XML with SOAP:
<MetaDataConstraint class="topics">
<Value>FRX</Value>
</MetaDataConstraint>
我不知道如何生成的属性。
I am not sure how to generate the attributes.
根据<一个href=\"http://stackoverflow.com/questions/2045850/using-soap-to-generate-xml-attributes-in-php\">http://stackoverflow.com/questions/2045850/using-soap-to-generate-xml-attributes-in-php,我试着做以下,但可惜的是它不工作。
Based on: http://stackoverflow.com/questions/2045850/using-soap-to-generate-xml-attributes-in-php, I tried to do the following, but unfortunatelly it does not work.
$ myFilter =阵列(MetaDataConstraint=>阵列(_=>阵列(值=>FRX)),
阶级=>主题);
$myFilter = array("MetaDataConstraint" => array("_" => array("Value" => "FRX")), "class" => "topics");
我该如何解决呢?
推荐答案
尝试:
$obj = new stdClass();
$obj->class = "topics";
$obj->Value = "FRX";
$myfilter = $obj;
这篇关于使用SOAP来生成PHP的XML属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文