1
Actively validating against specific XSD when serializing
Question asked by Scott Zrubek - 10/20/2022 at 2:39 PM
Answered
In our application we have two XSDs that the serialized output should be based on.  Based on selections the user chooses we create various flavors of objects and then serialize them to XML.

Is it possible for the serializer (or some method before we get to serializing) to validate against a specific XSD (and, I guess, validate the XSD as well?)

3 Replies

Reply to Thread
0
Liquid Support Replied
Employee Post
I'm not sure if this will help, but you can create an XmlReader which will validate against the original XML Schema.

Please see the Liquid XML Objects documentation:

Assuming you are using Liquid XML Objects?
0
Scott Zrubek Replied
A slightly different slant on this question: does the serializer validate against the Liquid XML objects or the xsd specified in the xml in the namespacemap of the lxwriter settings?
0
Liquid Support Replied
Employee Post Marked As Answer
It validates the generated XML document against the XSD.

Reply to Thread