Correct your XML, it is invalid. XML files can contain only one root element.
Valid XML Example:
<?xml version='1.0' encoding='ISO-8859-1'?>
<action>
<type>register</type>
<name>Johnny B</name>
<username>John</username>
</actions>
Or, if you want only the parameters to have their own elements:
<?xml version='1.0' encoding='ISO-8859-1'?>
<action type="register">
<name>Johnny B</name>
<username>John</username>
</actions>
or if you want some action:
<?xml version='1.0' encoding='ISO-8859-1'?>
<actions>
<action type="register">
<name>Johnny B</name>
<username>John</username>
</action>
</actions>
EDIT
, XML. . XML .
, , , :
$xmlstring = str_replace(
array('<action>','</paramters>'),
array('<root><action>', '</paramters></root>'),
$xmlstring
);