Adding a SOAP / XML parameter in PHP -


i using soap in php.

at moment submitting tag

<tag>data</tag> 

but want submit

<tag parameter=value>data</tag> 

for life of me, can't find out how this. don't know parameter=value pair referred as?

can please?

okay - after bit of hard looking, , lucky google, have found out answer own question.

to add parameter (or several) xml tag use 'soapvar' command :

$xmlvar = soapvar('<anytype xsi:type="invoiceline">'.$line_xml.'</anytype>',xsd_anyxml) 

this produce following xml :

<anytype xsi:type="invoiceline"><otherstuff>data</otherstuff></anytype> 

so , good. problem appoach need able isolate 'otherstuff' goes in middle of tag sandwich - in case it's $line_xml variable. long can this, approach seems work fine.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -