Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SAXParser and java.sql types

 
Ahmed Basheer
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
I need to define the java.sql.types in the XML doxument file.How I can I retrieve the types back when I parser the document. Do I have to specify it like this?
<columntype>VARCHAR<columntype>
I want to map VARCHAR to java.sql types and don't want to do the string comparison. Is there any solution? I heard that these types can be specified in the xml schema document. Does that mean that I have to parse XML schema document as well to retrieve the element.Any help will be appreciated.
Thanks,
Ahmed
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no way of telling the parser to "give you java.sql.* objects" -- you need to parse the string into a Java object yourself with java.sql.Date#valueOf(String) etc.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic