XML remains one of the most widely used formats in enterprise integration. Despite the popularity of JSON-based APIs, many business applications, ERP platforms, banking systems, government services, and B2B solutions still exchange information using XML documents validated against XML Schemas (XSDs).
The good news is that Azure Logic Apps Standard supports XML Schemas natively. These artifacts let you to validate incoming XML messages, transform them with maps, and build robust integration solutions without custom code.
In this article, I will show you how to create an XML Schema (XSD) directly inside Visual Studio Code and make it available to your Logic App Standard solutions without ever opening Visual Studio.
📝 One-Minute Brief
XML Schemas (XSDs) remain a core component of many enterprise integration solutions. Although Visual Studio Code does not provide a graphical designer for creating XSD documents, GitHub Copilot can help generate XML Schemas directly from sample XML messages. In this article, I demonstrate how to use GitHub Copilot inside VS Code to create an XML Schema, add it to a Logic App Standard project, and validate it using real XML payloads, all without requiring Visual Studio or Integration Account tooling.
Understanding the challenge
One thing that often surprises developers moving to Azure Logic Apps Standard is that VS Code doesn’t provide tooling for creating XML Schemas.
While a Logic App Standard project/workspace contains folders such as:
- Schemas
- Maps
- Rules
Inside the Artifacts folder, VS Code does not include a visual XML Schema Designer.
Traditionally, developers create XML Schemas using:
- Visual Studio using BizTalk Server project/extensions or Azure Integration Account extensions
- Or other third-party tools.
These tools provide graphical designers that let you to automatically generate XSD files or create them manually. However, if your daily development environment is Visual Studio Code, switching tools just to create a schema can feel unnecessary and disruptive.
In reality, an XML Schema is simply an XML document. Nothing prevents you from creating or maintaining it entirely in VS Code as a plain-text file. However, manually building XML Schemas is both tedious and time-consuming.
You need to define:
- Root elements
- Complex structures
- Child elements
- Data types
- Occurrence rules
- Collections
- Constraints
Even for experienced integration developers, this can quickly become repetitive work.
Before we continue, let me be clear.
I am not going to explain every XML Schema concept in detail in this article. Creating enterprise-grade schemas involves many considerations:
- Complex Types
- Simple Types
- Data constraints
- Enumerations
- Namespaces
- Optional elements
- Collections
- Attributes
- Schema imports
- Type inheritance
The topic could easily fill an entire series of blog posts.
Instead, the goal of this article is to demonstrate a modern and practical approach that allows you to create XML Schemas directly from VS Code using natural language and sample payloads.
And this is where GitHub Copilot becomes extremely useful.
How to easily create an XML Schema in VS Code using GitHub Copilot
Fortunately, GitHub Copilot can dramatically simplify the process.
Instead of manually creating every XSD component, you can provide:
- Sample XML documents
- Desired schema requirements
- Naming conventions
and ask Copilot to generate the Schema.
As a result, schema development becomes significantly faster while reducing the chance of introducing mistakes.
Using GitHub Copilot in Visual Studio Code
Let’s imagine we have the following XML message:
<ns0:CustomerOrder xmlns:ns0="http://Northwind.BusinessSolution.Schemas.CustomerOrder">
<CustomerName>Sandro Pereira</CustomerName>
<CustomerContact>961098121</CustomerContact>
<CustomerPONumber>A1245FD5</CustomerPONumber>
<Priority>5</Priority>
<QuoteReferenceId>12345</QuoteReferenceId>
<SalesOrderReferenceID>SN9019</SalesOrderReferenceID>
<CreatedDate>2015-09-11</CreatedDate>
<FreightAmount>0</FreightAmount>
<MiscCharges>0</MiscCharges>
<SubTotal>0</SubTotal>
<TotalOrderAmount>10</TotalOrderAmount>
<Lines>
<SaleOrderLine>
<LineNumber>1</LineNumber>
<UnitPrice>1</UnitPrice>
<Quantity>10</Quantity>
<ItemID>10</ItemID>
</SaleOrderLine>
<SaleOrderLine>
<LineNumber>1</LineNumber>
<UnitPrice>2</UnitPrice>
<Quantity>5</Quantity>
<ItemID>11</ItemID>
</SaleOrderLine>
</Lines>
<Status>PreOrder</Status>
<Comments></Comments>
<UnitPrice>0</UnitPrice>
<ns1:ShippingAddress xmlns:ns1="http://Northwind.BusinessSolution.Schemas.SchemaCommonStructures">
<City>Crestuma</City>
<Country>Portugal</Country>
<Street>Crestuma</Street>
<Email>sandro.pereira@devscope.net</Email>
<Email>sandro-pereira@live.com.pt</Email>
<Fax></Fax>
<State>Porto</State>
<Zip>4415</Zip>
<Phone>961098121</Phone>
</ns1:ShippingAddress>
</ns0:CustomerOrder>
To create an XML Schema for this message, we need to:
- Step 1: Open a Logic App Standard project
- Open an existing Logic App Standard workspace in Visual Studio Code or create a new one.
- Step 2: Open the GitHub Copilot Chat
- In GitHub Copilot Chat:
- Attach the sample XML document to provide additional context.
- And enter a prompt similar to:
- In GitHub Copilot Chat:
Create an XML schema for the xml instance in attach.
Notice that there is a <ns1:ShippingAddress with the following namespace: http://Northwind.BusinessSolution.Schemas.SchemaCommonStructures, this needs to be a different schema called “CommonStructures.xsd” and you need to import it to the main schema that will be called: “CustomerOrder.xsd”
Notice also that SaleOrderLine element is a repeat record inside Lines. Everything that is numbers put the date type as integer. And the CreatedDate element is a string
- Step 3: Let Copilot do the work.
Once you press Enter, GitHub Copilot will:
- Analyze the sample XML
- Infer data types
- Create element definitions
- Generate an XSD file
After a few minutes, you should find a new schema file inside:
Artifacts
└── Schemas
└── customers.xsd
Notice that we never had to manually create:
- Complex Types
- Sequences
- Element definitions
- Data types
GitHub Copilot generated them automatically.
Finally, we need to review the generated Schema (s). In a real-world scenario, you may need additional validation rules or to fine-tune the Schema a bit.
For example:
- Email format restrictions
- Minimum lengths
- Maximum lengths
- Enumerations
- Required versus optional fields
However, Copilot provides an excellent starting point you can refine as needed. And we can also use Copilot to fine-tune the Schema with additional rules.
Testing the Schemas
Finally, we should test our schemas. For that, you can use:
- GitHub Copilot to perform unit tests
- Or simply build a test workflow with the following actions:
When an HTTP request is received
↓
XML Validation
↓
Response
The XML Validation action will validate the incoming XML payload against the uploaded Schema
Then, using Postman or another HTTP client, send your sample XML document to the Logic App endpoint.
If the XML conforms to the Schema:
- Validation succeeds.
- The workflow continues.
- A successful response is returned.
If a required element is missing or contains an invalid data type:
- Validation fails.
- Logic Apps will fail.
This gives you immediate confirmation that the generated Schema behaves as expected.
Why this approach matters
For years, creating XML Schemas required:
- Visual Studio
- BizTalk tooling
- Integration Account tooling
Today, GitHub Copilot changes that experience completely.
Instead of spending time writing repetitive XML definitions, you can:
- Describe your requirements
- Provide sample documents
- Let Copilot generate the initial Schema
This speeds up development while keeping everything in your preferred development environment.
For Logic Apps developers working primarily in VS Code, this workflow removes a significant productivity bottleneck.
Conclusion
Although Visual Studio Code does not include a graphical XML Schema Designer, that limitation does not prevent you from building and maintaining XML Schemas for Azure Logic Apps Standard.
Because XML Schemas are ultimately XML documents themselves, they can be authored and edited directly in VS Code. More importantly, GitHub Copilot can generate most of the schema structure automatically from sample XML payloads and simple natural language instructions.
Rather than manually defining every element, complex type, sequence, and datatype, you can leverage Copilot to create a working schema in seconds. This dramatically reduces development effort and allows you to focus on validating business requirements rather than writing boilerplate XSD code.
While this approach doesn’t fully replace the rich graphical design experience in Visual Studio, it offers a practical, highly efficient alternative for developers who spend most of their time in VS Code.
By combining Azure Logic Apps Standard, XML Schemas, and GitHub Copilot, you can create, maintain, and validate XML artifacts without ever leaving your VS Code workspace. The result is a faster, simpler, and more modern development experience for enterprise integration projects.
I hope you find this helpful! If you liked the content or found it useful and want to help me write more, you can consider buying (or helping to buy) my son a Star Wars LEGO set.