xmlstarlet add undiscriminated rows
<p>I have the following XML file:</p>

<p>


</p>

<p>I try to add the following</p>

<pre><code>&lt;functions loglevel="error"&gt;
&lt;function spreadsheet_function="GETTPOS"/&gt;
&lt;function spreadsheet_function="GETLPOS"/&gt;
&lt;/functions&gt;
</code></pre>

<p>I executed the following:</p>

<pre><code>xmlstarlet ed -s "/_:php_macro_engine_config" -t elem -n "functions" -v "" -i "/_:php_macro_engine_config/functions" -t attr -n loglevel -v error
-s "/_:php_macro_engine_config/functions" -t elem -n "function" -i "/_:php_macro_engine_config/functions/function" -t attr -n spreadsheet_function -v GETTPOS
-s "/_:php_macro_engine_config/functions" -t elem -n "function" -i "/_:php_macro_engine_config/functions/function" -t attr -n spreadsheet_function -v GETLPOS 
macro_engine_config.xml
</code></pre>

<p>it creates the following:</p>

<pre><code>&lt;function spreadsheet_function="GETTPOS" spreadsheet_function="GETLPOS"/&gt;
&lt;function spreadsheet_function="GETLPOS"/&gt;
</code></pre>

<p>how can I differentiate both in the xmlstarlet parameters?</p>