use App\Helpers\XMLSerializer;
$request = array("conditions" => array(
"language" => "EN",
"par_adt" => 1,
"extraData" => array(
"_attributes" => array(
"someRandomAttribute" => "this_is_the_attribute_value"
),
"_value" => "This is the value of the extraData"
),
"People" => array(
array("_name" => "person", "name" => "Dave"),
array("_name" => "person", "_value" => "David")
),
"limit_count" => 10
));
return XMLSerializer::generateValidXmlFromArray(self::processRequest($request, $options));
This would output
<conditions>
<language>EN</language>
<par_adt>1</par_adt>
<extraData someRandomAttribute="this_is_the_attribute_value"> This is the value of the extraData </extraData>
<People>
<person>
<name>Dave</name>
</person>
<person>David</person>
</People>
</condition>