tags:

views:

228

answers:

2

I found you can generate this in SOAP in php:

<foo bar="blah">12345</foo>

With this:

array("foo" => array("_" => 12345, "bar" => "blah"));

However, the underscore method does not seem to work when the value is not a number and string, but instead embedded xml code. How would you do this for instance?

<foo bar="blah">
    <aaa a="b">blah</aaa>
</foo>

This is an extension of this person's question: http://www.bigresource.com/Tracker/Track-php-uQwDoUib/

+1  A: 

I don't have a quick way of testing, but maybe this would work:

$a = array(
    'foo' => array(
        'bar' => 'blah',
        'aaa' => array(
            '_' => 'blah',
            'a' => "b",
        ),
    ),  
);
bogeymin
Yeah, that works!
Jonah
A: 

Does not work for me.

Tried to do something very similar here: http://stackoverflow.com/questions/3467624/using-soap-to-generate-xml-attributes-in-php

but it does not work.

Vadim