Contact Us 1-800-596-4880

XML Module - Mule 4

XML Module v1.2

The XML Module can process and extract data from an XML document. Although DataWeave is recommended for most XML-related use cases, the XML module should be used for cases that involve the use of XML standards such as XSLT, XPath and XQuery, or XSD.

To use the XML module, you can add it to your Mule app through the Studio UI, or you can add the following dependency in your pom.xml file:

<dependency>
    <groupId>org.mule.modules</groupId>
    <artifactId>mule-xml-module</artifactId>
    <version>x.x.x</version> <!-- or newer -->
    <classifier>mule-plugin</classifier>
</dependency>

Mule runtime engine (Mule) converts RELEASE to the latest version.

Release Notes: XML Module Release Notes
Exchange: XML Module

Validate Against a Schema

When using the XML Module to validate against a schema that has references to other local schema files, validation can fail because the access was restricted by the expandEntities as it was using the default value of NEVER. The error message is: The supplied schemas were not valid. schema_reference: Failed to read schema document NMVS_Composite_Types.xsd, because file access is not allowed due to restriction set by the accessExternalSchema property.

You can eliminate this issue by adding expandEntities="INTERNAL" to the xml-module:config element.

View on GitHub