Update XML when you dont know the [index]

Hi,

I need to update some XML which is loading dynamically and it will change every minute. The trouble is I dont know the location of the bit of XML I need to update, so I’m hoping to use an attribute value, but this too will be a variable. The (simplified) code I’m using to update is:

var Attribute:String = “bv4e34er”;
//(do some processing to the loaded XML values here and then update the XML)
myXML.myCustomer.(myCustomerSpec.@UID==Attribute ).myCustomerValue = 10000000000;

which should update the ‘group’ with attibute value “bv4e34er”;

However, it only inserts two new lines of XML and doesnt update the XML.

An example of the XML I’ve got to update is (notice the location of “bv4e34er” for the customer Graham):

<XML>
<myCustomer>
<myCustomerSpec UID=“dfgw45gsrg45”>
<myCustomerName>Andy</myCustomerName>
<myCustomerValue>100</myCustomerValue>
<myCustomerCredit>1000</myCustomerCredit>
<myCustomerDescription>Need to dial extension 34</myCustomerDescription>
</myCustomerSpec>
</myCustomer>
<myCustomer>
<myCustomerSpec UID=“dfer45645”>
<myCustomerName>Brian</myCustomerName>
<myCustomerValue>123</myCustomerValue>
<myCustomerCredit>3000</myCustomerCredit>
<myCustomerDescription>Left answer message</myCustomerDescription>
</myCustomerSpec>
</myCustomer>
<myCustomer>
<myCustomerSpec UID=“fghxfhsrt”>
<myCustomerName>Geoff</myCustomerName>
<myCustomerValue>900</myCustomerValue>
<myCustomerCredit>4200</myCustomerCredit>
<myCustomerDescription>Phone Friday</myCustomerDescription>
</myCustomerSpec>
</myCustomer>
<myCustomer>
<myCustomerSpec UID=“bv4e34er”>
<myCustomerName>Graham</myCustomerName>
<myCustomerValue>200</myCustomerValue>
<myCustomerCredit>3303</myCustomerCredit>
<myCustomerDescription>Over at Southern office</myCustomerDescription>
</myCustomerSpec>
</myCustomer>
</XML>

any help appreciated and I’ll buy you a virtual coffee!