Is it possible? Updating single XML node

I can get the xml into a property list and navigate it to retrieve data, however I was wondering if I could do something similar to the following:

set property Active of each item of Tree to 1 where Name of each is “Testing”

when I try this, I get the following exception:
FAILURE Invalid Range Only numeric, date/time, and character ranges are supported.
Execution Time 0:00:00 TestStuff2.script

I’ve tried several different ways to try and make this work in a quick and efficient way, but I can’t seem to find an easy way to do this. Currently my work around is to create another Tree and updating the 1 value while making it, iterating through each value/node.

Right, I guess I didn’t explain my problem well enough or I’m just doing things so wrong that nobody can help. An example of what I’m doing:

set xml to {{
<iPads>
&lt Pad Name="ErikS" IP="10.0.0.1" Active="true" SUT="" time=""/ &gt
&lt Pad Name="Toms" IP="10.0.0.2" Active="true" SUT="" time=""/ &gt
&lt Pad Name="Jerrys" IP="10.0.0.3" Active="true" SUT="" time=""/ &gt
</iPads>
}} as tree

*It won’t display the attributes of the pad lines I put them in there with <>
Now I want to set ErikS pad to have Active=true, SUT=connectioninfo().Name, and time=the international date && the abbrev time

To do that currently I’m doing:

repeat with each item of xml
		if it.Name is NAME
			set it.Active to "true"
			set it.SUT to ConnectionInfo().Name
			set it.time to the international date && the abbrev time
			put it into item repeatindex() of xml
		end if
	end repeat

Which seems kinda sloppy. I would like to know if there is a quick way to set the attributes of this node. I can easily get them using:

put each item of xml where name of each is NAME

or a specific value using:

put property Active of each item of xml where name of each is NAME

It would be very cool if I could do something like setting these same values using the same logic:

set property Active of each item of xml where name of each is NAME to VALUE

or

Insert VALUE into property Active of each item of xml where name of each is NAME

The http://docs.testplant.com/?q=content/working-trees-and-xml page wasn’t too helpful with explaining how to set values in cases where I have several branches with the same tag but different attributes. Most of my problems are likely due to the xml structure.