If you’re having problems with XML validation going in or out of XML (formatter/parser) or if you wish to validate a binary XML without parsing it so save execution time you can use the XSLT snap to do this validation.
XSLT snap takes a binary input and has a binary output and has an xsd setting available to use for validation against the input data to the snap. You can utilize this function to do your validation without modifying the input XML data.
You can write a simple xslt file such as this to essentially pass through the XML data without modifying the structure. This is valid in our XSLT snap and when paired with an XSD essentially converts XSLT snap into a binary xml validator.
Sample XSLT that can be used to perform pass-through functions for any structure:
<xsl:stylesheet version=“1.0” xmlns:xsl=“http://www.w3.org/1999/XSL/Transform”>
<xsl:output method=“xml” version=“1.0” encoding=“UTF-8” indent=“yes”/>