How to validate for an xsd date time value in java for a valid value when the element is described as string in the schema?

The elements in the XSD are described as string. But the value that will be received is a date time type. I have to validate them in Java and allow only XSD valid date time values. Otherwise the request/response must fail validation. Is there any open source API available for this or any regex suggestions is also welcome. Thanks!

Source: xml

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.