This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes SAXParser and java.sql types Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "SAXParser and java.sql types" Watch "SAXParser and java.sql types" New topic
Author

SAXParser and java.sql types

Ahmed Basheer
Ranch Hand

Joined: Apr 15, 2004
Posts: 77
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

Joined: Jan 23, 2002
Posts: 11962
    
    5
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.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SAXParser and java.sql types
 
Similar Threads
WSDL external schema import
document Vs rpc message styles
XML and unknow html tags
Vector into Array
Vector into Array