You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/logic-apps/logic-apps-enterprise-integration-xml-parse.md
+77-20Lines changed: 77 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,51 +1,53 @@
1
1
---
2
2
title: Parse XML using Schemas in Standard workflows
3
-
description: Learn how to parse XML documents using schemas in Standard workflows with Azure Logic Apps.
3
+
description: Learn how to parse XML documents by using schemas in Standard workflows with Azure Logic Apps. Discover how to work with individual XML elements in your workflows.
4
4
services: logic-apps
5
5
ms.service: azure-logic-apps
6
6
ms.suite: integration
7
7
author: haroldcampos
8
8
ms.author: hcampos
9
9
ms.reviewers: estfan, azla
10
10
ms.topic: how-to
11
-
ms.date: 11/18/2025
11
+
ai-usage: ai-assisted
12
+
ms.date: 02/25/2026
13
+
#Customer intent: As an integration developer who works with Azure Logic Apps, I want to parse XML documents by using an XSD schema so I can work with individual XML elements in my workflow.
12
14
---
13
15
14
-
# Parse XML using schemas with Standard workflows in Azure Logic Apps
16
+
# Parse XML by using schemas in Standard workflows with Azure Logic Apps
In enterprise integration business-to-business (B2B) or BizTalk migration scenarios, you might have to parse XML documents. Your Standard logic app workflow can parse XML by using the action named **Parse XML with schema**, which requires an XSD schema.
20
+
In enterprise integration scenarios, such as business-to-business (B2B) or BizTalk migrations, you might need to parse XML documents. Standard logic app workflows in Azure Logic Apps can parse XML using the action named **Parse XML with schema**, which requires an XSD schema.
19
21
20
-
For example, suppose you regularly receive customer orders or invoices that use XML as the exchange format and need to access individual XML elements in the workflow designer for Azure Logic Apps.
22
+
For example, suppose you regularly receive customer orders or invoices in XML format. Suppose you must access individual XML elements directly in the workflow designer for Azure Logic Apps.
21
23
22
24
## Limitations
23
25
24
-
This action is currently not yet supported for the [Consumption logic app resource and workflow](logic-apps-overview.md#resource-environment-differences).
26
+
The [Consumption logic app resource and workflow](logic-apps-overview.md#resource-environment-differences) doesn't support this action.
25
27
26
28
## Prerequisites
27
29
28
-
* An Azure account and subscription. If you don't have a subscription yet, [sign up for a free Azure account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
30
+
- An Azure account and subscription. [Get a free Azure account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
29
31
30
-
* A Standard logic app workflow that already starts with a trigger so that you can add the **Parse XML with schema** action to your workflow.
32
+
- A Standard logic app workflow that starts with a trigger so that you can add the **Parse XML with schema** action to your workflow.
31
33
32
-
* An [integration account resource](enterprise-integration/create-integration-account.md) where you define and store artifacts, such as trading partners, agreements, certificates, and so on, for use in your enterprise integration and B2B workflows. This resource has to meet the following requirements:
34
+
- An [integration account resource](enterprise-integration/create-integration-account.md) where you define and store artifacts, such as trading partners, agreements, certificates, and other items, for use in your enterprise integration and B2B workflows. This resource must meet the following requirements:
33
35
34
-
* Is associated with the same Azure subscription as your logic app resource.
36
+
- Is associated with the same Azure subscription as your logic app resource.
35
37
36
-
* Exists in the same location or Azure region as your logic app resource where you plan to use the **Parse XML with schema** action.
38
+
- Exists in the same location or Azure region as your logic app resource where you plan to use the **Parse XML with schema** action.
37
39
38
-
* If you're working on a [Standard logic app resource and workflow](logic-apps-overview.md#resource-environment-differences), you can link your integration account to your logic app resource, upload XSD schemas directly to your logic app resource, or both, based on the following scenarios:
40
+
- If you're working on a [Standard logic app resource and workflow](logic-apps-overview.md#resource-environment-differences), you can link your integration account to your logic app resource, upload XSD schemas directly to your logic app resource, or both, based on the following scenarios:
39
41
40
-
* If you already have an integration account with the artifacts that you need or want to use, you can link your integration account to multiple Standard logic app resources where you want to use the artifacts. That way, you don't have to upload XSD schemas to each individual logic app. For more information, review[Link your logic app resource to your integration account](enterprise-integration/create-integration-account.md?tabs=standard#link-account).
42
+
- If you already have an integration account with the artifacts that you need or want to use, you can link your integration account to multiple Standard logic app resources where you want to use the artifacts. You don't have to upload XSD schemas to each individual logic app. For more information, see[Link your logic app resource to your integration account](enterprise-integration/create-integration-account.md?tabs=standard#link-account).
41
43
42
-
* If you don't have an integration account or only plan to use your artifacts across multiple workflows within the *same logic app resource*, you can [directly add schemas to your logic app resource](logic-apps-enterprise-integration-schemas.md) using either the Azure portal or Visual Studio Code.
43
-
44
-
So, if you don't have or need an integration account, you can use the upload option. Otherwise, you can use the linking option. Either way, you can use these artifacts across all child workflows within the same logic app resource.
44
+
- If you don't have an integration account or only plan to use your artifacts across multiple workflows within the *same logic app resource*, you can [directly add schemas to your logic app resource](logic-apps-enterprise-integration-schemas.md) by using either the Azure portal or Visual Studio Code.
45
45
46
-
You still need an integration account to store other artifacts, such as partners, agreements, and certificates, along with using the [AS2](logic-apps-enterprise-integration-as2.md), [X12](logic-apps-enterprise-integration-x12.md), and [EDIFACT](logic-apps-enterprise-integration-edifact.md) operations.
46
+
- If you don't have or need an integration account, you can use the upload option. Otherwise, use the linking option. Either way, you can use these artifacts across all child workflows within the same logic app resource.
47
47
48
-
* The XSD schema to use with the **Parse XML with schema** action. Make sure that this schema includes a root element, which looks like the following example:
48
+
You still need an integration account to store other artifacts, such as partners, agreements, and certificates, if you use the [AS2](logic-apps-enterprise-integration-as2.md), [X12](logic-apps-enterprise-integration-x12.md), and [EDIFACT](logic-apps-enterprise-integration-edifact.md) operations.
49
+
50
+
- The XSD schema to use with the **Parse XML with schema** action. Make sure that this schema includes a root element, which looks like the following example:
49
51
50
52
```xml
51
53
<xs:elementname="Root">
@@ -63,7 +65,7 @@ This action is currently not yet supported for the [Consumption logic app resour
63
65
64
66
1. Under the step in your workflow where you want to add the **Parse XML with schema** action, [follow these general steps to add the action named **Parse XML with schema**](create-workflow-with-trigger-or-action.md?tabs=standard#add-action).
65
67
66
-
1. In the **Content** box, specify the XML content that you want to parse using any XML data that you receive in the HTTP request.
68
+
1. In the **Content** box, specify the XML content that you want to parse by using any XML data that you receive in the HTTP request.
67
69
68
70
1. To select outputs from previous operations in the workflow, in the **Parse XML with schema** action, select inside the **Content** box, and select the dynamic content list option (lightning icon).
69
71
@@ -99,6 +101,61 @@ The following table describes the advanced parameters available in this action:
99
101
|**Use Fully Qualified Names?**|**No** or **Yes**| Whether to use simpler local names or fully qualified XML names. |
100
102
|**Root Node Qualified Name**| <*root-node-qualified-name*> | The root node's qualified name in case the schema contains multiple unreferenced element definitions. |
101
103
104
+
## Troubleshoot problems
105
+
106
+
This section describes problems that you might encounter and possible solutions or workarounds to address these problems.
107
+
108
+
### XML element order isn't preserved
109
+
110
+
If your XML has repeating elements that appear in mixed order, the **Parse XML with schema** action might not preserve the original order and groups these elements by their name in alphabetical order.
111
+
112
+
This behavior is expected because the **Parse XML with schema** action converts the XML to JSON. This format doesn't have a way to represent a single ordered list with different types of items. Instead, the action groups the elements by name in alphabetical order.
113
+
114
+
For example, suppose you have items with the following names in this specific order: `A`, `B`, `B`, `A`:
115
+
116
+
**Before**
117
+
118
+
```xml
119
+
<Items>
120
+
<A>1</A>
121
+
<B>2</B>
122
+
<A>3</A>
123
+
<B>4</B>
124
+
</Items>
125
+
```
126
+
127
+
After the action parses the XML, the resulting JSON groups and reorders these items by name as follows: `A`, `A`, `B`, and `B`:
128
+
129
+
**After**
130
+
131
+
```json
132
+
{
133
+
"A": ["1", "3"],
134
+
"B": ["2", "4"]
135
+
}
136
+
```
137
+
138
+
The **Parse XML with schema** action doesn't have any setting that preserves the order of mixed repeating elements. This limitation results from converting XML to JSON.
139
+
140
+
The following list describes options for you to fix or work around this problem:
141
+
142
+
- If you control the schema, design the schema so you have only one repeating list without multiple repeating element types.
143
+
144
+
For example, rather than separately repeat `A` and `B`, use a single repeating wrapper element, such as `Item`. Each item then indicates whether `A` or `B` is represented. The system can then keep all the items in a single ordered list and preserve the original order. This option is best for long-term, predictable behavior.
145
+
146
+
- If the original order is required or critical, don't parse the XML.
147
+
148
+
- Avoid breaking up the XML into JSON.
149
+
- Handle the XML document as a whole.
150
+
- Pass the XML document unchanged or transform the content by using XML-based tools such as XSLT.
151
+
152
+
- Keep this limitation in mind.
153
+
154
+
If you can't change the schema or workflow, remember the following:
155
+
156
+
- Mixed repeating elements are grouped by element name, losing the original order.
157
+
- Design the downstream logic with this behavior in mind.
158
+
102
159
## Related content
103
-
160
+
104
161
-[Compose XML with schema](logic-apps-enterprise-integration-xml-compose.md)
0 commit comments