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

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

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

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

Try
SimpleDateFormat
.  You simply set a format such as the one in your example and then call parse on your dateStr.