OCLOperators XmlValidateWithSchemas
m ((username removed) (log details removed): Moving to Documentation namespace)
(Automatically adding template at the end of the page.)
 
Line 8: Line 8:
   [[Category:OCLOperators]]
   [[Category:OCLOperators]]
[[Category:OCL ViewModel Operators]]
[[Category:OCL ViewModel Operators]]
{{Edited|July|12|2024}}

Latest revision as of 15:40, 10 February 2024

selfVM.XmlValidateWithSchemas(somexml, collection of URLs to schemas)

This operator reads one or more XML Schemas and validates the supplied XML in regard to those schemas.

selfVM.XmlValidateWithSchemas( '<root/>' ,  Set{'http://www.gdsregistry.org/3.1/schemas/gs1/gdsn/CatalogueItemNotification.xsd'} )->foreach(s|self.Details.Add(Detail.Create);self.Details->last.Attribute1:=s)

Output in strings will look something like this:

Error: The 'gtin' element is invalid - The value '' is invalid according to its datatype 'urn:gs1:shared:shared_common:xsd:3:GTINType' - The Pattern constraint failed.
Warning: No schema for root element.
This page was edited 97 days ago on 02/10/2024. What links here