Hi I worte an application in java to retrieve data from xml and insert that data in to the database. Here I got the problem with datatatypes. Now I would like to know whether it is possible to know the data types from xml document Thank u in advance Saradhi
Nope it is not possible. Everything in the XML is interpreted as plain text data. You will have to write an intelligent routine to infer the datatypes during the parsing. One way to do it is to store column descriptions for a particular table and during the XML parsing simply look up the datatype for that particular column. Or you can have an attirbute called type and store types as string values. For example - < EmployeeName type = "String"> David Copperfield </EmployeeName> <EmployeeSalary type = "Number"> 200200.90 </EmployeeSalary> <EmployeeDateJoined type = "DateTime"> 05/15/1993 </EmployeeDateJoined>
Hope that helps! ------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).