I have been trying to access nodes in my Xml template which I have stored in xDocument variable in Uipath.
However with this structure I cant seem to do it. If I cut out lines and leave only and its contents, I can access nodes and edit them just fine. This is the xml. I edited out some bits.
Thanks, there is certainly a more elegant way to achieve this, but if you provide the Element name you wish to access to this workflow, it will return the value of that element.
So for example, ‘p4’ will return the value ‘xxx’. If you are doing a heavy amount of processing like this however, it may be better to access the various nodes as you are attempting, which would be the traditional way of working with XMLs.
Thank you for your answer. However I would need to edit those node values in my template and call a service with this xml after. I still dont know how to edit those nodes. Do you have an idea how to achieve this?
Sure, you are acting on an XDoc when searching the Nodes. So you can use the following syntax to update the value to what you need, then just export the resulting XDoc to a text for example.