How to get and update the value of a attribute from the XML file

Hey team ,

1 .Can you please help me extract the value of “Company_Reference_ID” (CMP0061) and “Supplier_Invoice_ID” (TEST-1) from the attached xml file.
2. Also I want to update those values with new ones .
CMP0061 with CMP0062
TEST-1 with TEST-2

Please help in extracting and updating a XML

Also I have pasted a image highlighting the field I want for your reference.
MAIN_FILE - Copy.xml (3.7 KB)

Thank you , Gokul

Please take a look here, as this example will help you with Getting the value: How to find the value of xml attribute - #2 by Yoichi

These examples will help you with updating it:

I tried the above but could not find the solution.Thank you for your input. I am still trying.

Regards,
Gokul

ID - Company_Reference_ID


grafik

 xnsWD
 [urn:com.workdayi/bsvcdadass]
 xDoc.root.Descendants(xnsWD + "ID").Where(Function (x) x.Attribute(xnsWD + "type").value.Equals("Company_Reference_ID")).first()
 [<wd:ID wd:type="Company_Reference_ID" xmlns:wd="urn:com.workdayi/bsvcdadass">CMP0061</wd:ID>]
 xDoc.root.Descendants(xnsWD + "ID").Where(Function (x) x.Attribute(xnsWD + "type").value.Equals("Company_Reference_ID")).first().value = "ABC"
 "ABC"

ID - Supplier_Invoice_ID can be managed similar

It is always about handling xml namespaces

Working with the immediate panel helps us for the prototyping

Please check also your other open topics and and mark the solved ones with the solution flag. Thanks

1 Like

Thanks a lot @ppr . Can you please also let me know how do I update those values -

Pasted from question ---->
2. Also I want to update those values with new ones .
CMP0061 with CMP0062
TEST-1 with TEST-2

Regards,
Gokul

we show cased already above:

use an assign activity for this

1 Like

Thanks a lot!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.