Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

XML - XSD Validation

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Is there any one tried validation xml with xsd using java. I am trying to see whether it could be possible to validate a dateTime format as yyyy-mm-dd hh:mm using xsd.

Just for info, we can able to validate dateTime datatype if it has the format something like this

yyyy-mm-ddThh:mm or yyyy-mm-dd-hh:mm, now trying to explore whether datetime format with space in between can have any pattern in xsd to validate.

Any help is appreciated

Thanks
 
Ranch Hand
Posts: 729
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>we can able to validate dateTime datatype if it has the format something like this yyyy-mm-ddThh:mm or yyyy-mm-dd-hh:mm, ...
How do you validate those two formats? If you mean you've written it up on your own, you should have pretty good idea how to do the new format as well? You can just expand the charset holding [T-] to include space, like this [ T-]. Why wouldn't it work?
 
You get good luck from rubbing the belly of a tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic