• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

datatype

 
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While interacting with database, is there any way to know the datatypes in an XML document?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are talking about how to know the data type of an element in a document, that is covered by XML Schema. Here is an element from a SOAP message that is labeled as conforming to a particular format for a date.
<return xsi:type="xsd:date">1939-10-17</return>
Bill
 
rani bedi
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, I actually want to read data from XML and write to the XML document and even the vice-versa. I want somehow to know the datatypes of the data present in the XML document.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by parmeet bedi:
No, I actually want to read data from XML and write to the XML document and even the vice-versa. I want somehow to know the datatypes of the data present in the XML document.


Hi Permeet,
There are data types in XML Schema, and there are basic data types in an XML DTD, but unless you have access to those documents you'll just be guessing. However, from the context or element names you may be able to do a very good job guessing.
Hope this helps.
 
rani bedi
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
guessing won't help. In that case the records won't be inserted in the database resulting in an error. Any solution for that?
BTW can you elaborate more on schema datatypes you had mentioned?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic