Hey @raphaelRosin,
here is an example to set the Fieldname which is an _Attribute of the _tag Field within the node xml which is a node of testData. Working with xml and trees is a bit fiddely.
I am loading the XML as tree as object which puts it into a nice structure in a sensetalk variable. You can use the debugger to see the actual structure.
Here are a couple of links:
- trees and Nodes
- SenseTalk-Eggspert-Sessions/230201-trees/trees.suite at master(github.com)
- Keysight Eggplant SenseTalk Trees and XML - YouTube
- Objects
- Querying XML / Tree data - Eggplant Forum
set myCXML to {{
<testData>
<xml>
<Field FieldName="Ref" FieldValue="10" />
</xml>
</testData>
}}
put myobj -- {testData:[{xml:[{_tag:"Field", FieldName:"nothing", FieldValue:"10"}]}]}
put myCXML as tree as object into myobj
put myobj.testData.xml's FieldName -- before
Set myobj.testData.xml's FieldName to "nothing"
put myobj.testData.xml's FieldName -- after
Let me know in case you have further questions.
Cheers,
Karsten