Question
· Apr 9

Validate XML message against XSD schema

I'm trying to validate a %Stream.GlobalCharacter with an XML content against an XSD schema, to validate mandatory nodes, etc...

I'm trying to use the Ens.Util.XML.Validator class, as suggested on this post:

https://community.intersystems.com/post/validate-xml-message-against-xsd...

However, when calling the ValidateStream method, if schemaSpec is left empty, it just validates that is a "valid XML".

When specifying anything on schemaSpec, i receive the error "SAX XML Parser Error: Unable to Resolve SystemId"

Any examples  with the right specification on schemaSpec for ValidateStream? (a filepath to the XSD file, for example, or an XML schema imported on the namespace)

 

Product version: IRIS 2024.2
$ZV: IRIS for UNIX (Ubuntu Server LTS for ARM64 Containers) 2024.2 (Build 247U) Tue Jul 16 2024 09:31:25 EDT
Discussion (1)2
Log in or sign up to continue