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

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