Question

I've been working with code synthesis xsd to generate an xml tree to ensure constinency of the xml output to the original xsd.

After initial testing, everything looked ok but when I tried entering invalid values (correct type, but outside the defined range), the values were allowed.

Although the xml is well formed and conforms to the types set in the xsd, it is not a valid xml wrt the schema.

Has anybody else used this tool and/or come up across this problem?

Was it helpful?

Solution

The tool may not do the sort of checking you want when creating the document.

If your document is small, you may just want to generate the XML,then re-parse it with XSD checking on and let that be your checking.

OTHER TIPS

You'll want to provide some examples here to get a detailed response, but for now I think it's fair to say that all bets are off if your document doesn't validate according to the schema.

Remember it's the parser which does the schema validation, not Code Synthesis XSD (which by the way, is a terrible product name because it is difficult to use unambiguously!).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top