php - Guzzle Services - Generating an XML element with an attribute and value -


i'm using guzzle services build xml request based on given data. i'm having problems generating tag attribute , single value. example:

<foo bar="some value">some other value</foo> 

i can generate tag multiple attributes , no value this:

<foo bar="some value" baz="some other value" /> 

by using following service description:

'parameters' => [     'foo' => [         'location' => 'xml',         'type' => 'object',         'properties' => [             'bar' => [                 'location' => 'xml',                 'type' => 'string',                 'data' => ['xmlattribute' => true]             ],             'baz' => [                 'location' => 'xml',                 'type' => 'string',                 'data' => ['xmlattribute' => true]             ]         ]     ] ] 

or can generate tag single attribute , value that's nested inside tag, this:

<foo bar="some value">     <baz>some other value</baz> </foo> 

by using following service description:

'parameters' => [     'foo' => [         'location' => 'xml',         'type' => 'object',         'properties' => [             'bar' => [                 'location' => 'xml',                 'type' => 'string',                 'data' => ['xmlattribute' => true]             ],             'baz' => [                 'location' => 'xml',                 'type' => "string',             ]         ]     ] ] 

but doesn't seem there's way generate tag this:

<foo bar="some value">some other value</foo> 

is possible?


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -