I have a problem, I need to edit an xml file using php, based on a string variable it has been passed.

i.e., my php has a string variable which takes the value of either "true" or "false" and I need to alter the following xml file code:

```
<Parameter>             
     <ParameterName>Method1</ParameterName>                  
     <ParameterDescription>description</ParameterDescription>
     <ParameterValue type="bool">false</ParameterValue>
</Parameter>

<Parameter> 
     <ParameterName>Method2</ParameterName>       
     <ParameterDescription>description</ParameterDescription> 
     <ParameterValue type="bool">true</ParameterValue>
</Parameter> 

<Parameter>
     <ParameterName>Method3</ParameterName>
     <ParameterDescription>description</ParameterDescription>
     <ParameterValue type="float">0.025</ParameterValue> 
</Parameter>

```

So that the first "ParameterValue" changes from it's default "false" to whatever the value of the variable is (note that the variable in the php is a string, and in the xml is a boolean type). I have looked at suggestions involving awk, and sen and dom without much luck. I am hoping for the simplest way to change this one word in the XML!

James