An Introduction to Data Types in XML

When data is being defined in a programming language, there are two general strategies that can be employed. The difference between the two is the malleability of variables. In a strongly typed language, variables are declared to be of a certain type, and that type is maintained within fairly rigid rules. For example, take the following declaration in the Java programming language:

     int myInt;

myInt is a signed integer type occupying 32 bits of storage. Other data types can be assigned to myInt, but only when the other data types can be converted into an int without loss of information. Furthermore, myInt itself is never altered from the declared type.

In a weakly typed language, there are no formal declarations ...

Get Sams Teach Yourself XML in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.