XML Validation with Regular Expressions
September 15, 2004 Hey, David
The code for this article is available for download.
I want to set the date field in a schema to YYYYMMDD format and use this to validate an XML document. Will I have to have to write any Java code to support this? I also want to set the format of an amount to numbers, with 18 digits followed by 3 digits decimal value. The separator can be either a comma or a decimal point.
–Satish
From your description, it looks like you can use XML Schema’s pattern-matching capability. With pattern matching, you supply a regular expression that is