0

I am converting a Nintex flow into Power Automate flow, where inside the Nintex we have this extract XML step;-

enter image description here

For getting the outer xml and store it inside a Collection, our xml has this format:-

<?xml version="1.0" encoding="utf-8"?><RepeaterData><Version /><Items><Item><ArticleInput type="System.String">681495008421</ArticleInput><ArticleDescription type="System.String">KOBO LIBRA 2 EREADER BLK</ArticleDescription><ArticleReturnable type="System.String">True</ArticleReturnable><Qty type="System.Double">1</Qty></Item><Item><ArticleInput type="System.String">681495008421</ArticleInput><ArticleDescription type="System.String">KOBO LIBRA 2 EREADER BLK</ArticleDescription><ArticleReturnable type="System.String">True</ArticleReturnable><Qty type="System.Double">1</Qty></Item></Items></RepeaterData>

so what are the available actions inside Power Automate to achieve this?Thanks

Now i tried to initialize a variable as follow:- enter image description here

but i got this value for the variable on runtime:-

cotent-type":"application/xml;charset=utf-8","$content":"PEl0ZW0+DQogIDxBcnRpY2xlSW5wdXQgdHlwZT0iU3lzdGVtLlN0cmluZyI+MzMzMzMzMzM8L0FydGljbGVJbnB1dD4NCiAgPEFydGljbGVEZXNjcmlwdGlvbiB0eXBlPSJTeXN0ZW0uU3RyaW5nIj5kZXNjMzMzMzM8L0FydGljbGVEZXNjcmlwdGlvbj4NCiAgPEFydGljbGVSZXR1cm5hYmxlIHR5cGU9IlN5c3RlbS5TdHJpbmciPllFUzwvQXJ0aWNsZVJldHVybmFibGU+DQogIDxRdHk 

any advice on this please?

Thanks

1 Answer 1

1

Use below steps to get the outer / inner property of xml payload.

  1. Convert Xml to JSON by using below expression in power automate
json(xml(outputs('Compose_XML_Payload')))

xml payload and xml to json

  1. After conversions parse it in JSON so that you retrieve the property of object.

Parse Json

  • Out Put:

Power Automate Power Automat Run

  • RepeaterData output
{
    "Version": null,
    "Items": {
        "Item": [
            {
                "ArticleInput": {
                    "@type": "System.String",
                    "#text": "681495008421"
                },
                "ArticleDescription": {
                    "@type": "System.String",
                    "#text": "KOBO LIBRA 2 EREADER BLK"
                },
                "ArticleReturnable": {
                    "@type": "System.String",
                    "#text": "True"
                },
                "Qty": {
                    "@type": "System.Double",
                    "#text": "1"
                }
            },
            {
                "ArticleInput": {
                    "@type": "System.String",
                    "#text": "681495008421"
                },
                "ArticleDescription": {
                    "@type": "System.String",
                    "#text": "KOBO LIBRA 2 EREADER BLK"
                },
                "ArticleReturnable": {
                    "@type": "System.String",
                    "#text": "True"
                },
                "Qty": {
                    "@type": "System.Double",
                    "#text": "1"
                }
            }
        ]
    }
}
3
  • thanks for the helpful reply,, but what i should include in the first Compose action ? thanks
    – John John
    Apr 2, 2022 at 18:31
  • Don't use first compose action in your power automate. I used it for demo purpose. Pass out put of "Get Article xml" in second compose i.e. convert xml to JSON. Apr 3, 2022 at 6:06
  • sharepoint.stackexchange.com/questions/305125/… having same issue Dec 3, 2022 at 7:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.