Jump to content

Types of varibles in xml


Vzero

Recommended Posts

XML on itself is plain data. You can put whatever you want. It all depends on the application made as to how it will use the data. For example, you can write

<myElement myAttribute="1"/>

where 1 can be read as a number or as a string, depending on the application reading.If you're asking about the schema datatypes you can use in other languages for XML, then look at XML Schema datatypes. Any schema aware processor or application is going to use all of those datatypes, which bring us back to the previous point.In XSLT 1.0, there is only boolean, number, string and node-set. XSLT 2.0 is shema awared, so it can produce/read-as any of the schema datatypes. Other languages that do not use schema may use their own datatypes.

Link to comment
Share on other sites

  • 4 weeks later...

Hi, There is no need to specify any kind of data type in XML. As boen_robot told, XML is a structured data that's it.what data you deal whether int /float / char / string doesn't matter...So, if you want to access int value only, at the time of parsing XML file you can apply a simple filter to find whether fetched value is int of string.Better refer Google to find some sample program using DOM/SAX to access/fetch value from XML file.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...