Validation against XSD schema when using domain to xml mapping
I have an XSD which I use in a domain to xml mapping. The xsd contains something like: <xsd:element minOccurs="0" name="Gender"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:length value="1" /> <xsd:enumeration value="M" /> <xsd:enumeration value="F" /> <xsd:enumeration value="N" /> </xsd:restriction> </xsd:simpleType> </xsd:element> I'd like to validate the XML against the enumeration values. Can I do that from within Mendix or should I use java?
Frans Verschoor (FraternIT)
You can do it online as long as the data is not confidential.
Chris de Gelder
There is no option in Mendix to validate a xml file created with a domain-to-xml mapping, although this would be a nice feature. If you really want to validate your xml with a xsd, you need to use a java-action directly after the domain-to-xml.
Or you could check your object with a microflow before creating the xml.