Hi,
Pre-emptive TLDR: is there any way to use XML documents as flow inputs/outputs without it becoming a plain old string and therefore incapable of being parsed as an XML node?
I would like to build a set of flows that modify XML documents. Because these different flows share a huge number of operations that are the same but with different parameters, it made sense to turn each modification into its own flow and construct the larger programs (multiple, hence why I didn't just make subflows) by calling a bunch of other flows.
I have to pick my problem:
1. Reading from and writing to the XML file in every single "helper function" flow makes the program take 20-30x longer than it should.
2. Copy-pasting the operations to only read and write to the XML file once per program makes it run quick, but it's prone to error if I need to copy and paste literally thousands of commands and modify specific values in the path for each one, and extremely tedious if I need to change the way one of the XML modifications works and go back and change dozens of different flows rather than just the one helper flow.
3. Turning these operations into subflows for each cleans things up but has the same problem of being tedious and if I change the way a helper function works, I need to make that change to many different programs, which is prone to error.
Any ways to manage data types for I/O variables that I may not be aware of?
Thanks in advance.
Solved! Go to Solution.
I don‘t see any direct way to use the XML as Input variable in PAD. You can only use a XML-file and the XML-actions (e.g. Read XML from file ) in PAD (see https://docs.microsoft.com/en-gb/power-automate/desktop-flows/actions-reference/xml ).
A good description about handling these actions is here:
https://chercher.tech/power-automate-desktop/xml-automation-power-automate-desktop
Hi,
with the latest release you have more data types available:
see https://flow.microsoft.com/en-us/blog/power-automate-for-desktop-june-2022-update/
Thanks for the reply, but I am not sure it helps; is there any way to turn a custom object into an XML node?
If I pass an XML into the function as a variable, set that variable to custom object, and perform XML processing, I get an error saying:
Parameter 'XML document': Argument 'XML document' must be 'XML node'.
I have not yet found a workaround. Please let me know if there is any way to preserve the XML format. Thanks!
I don‘t see any direct way to use the XML as Input variable in PAD. You can only use a XML-file and the XML-actions (e.g. Read XML from file ) in PAD (see https://docs.microsoft.com/en-gb/power-automate/desktop-flows/actions-reference/xml ).
A good description about handling these actions is here:
https://chercher.tech/power-automate-desktop/xml-automation-power-automate-desktop
User | Count |
---|---|
13 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
20 | |
17 | |
17 | |
13 | |
12 |