Skip to Content
Special Edition Using XML, Second Edition
book

Special Edition Using XML, Second Edition

by - et al. David Gulbransen
July 2002
Intermediate to advanced
864 pages
22h 32m
English
Que
Content preview from Special Edition Using XML, Second Edition

decimal

There are not many data-centric XML documents in which numbers won't play some role in the data, and that is where the decimal type comes in. The decimal type is used to represent decimal numbers with arbitrary precision.

The decimal type allows for a leading sign of “+” or “-” to specify a positive or negative number, although the “+” is the default, so it is not necessary to use it. The type supports any theoretical amount of digits to the right or left of the decimal point, although XML processors are required to support only at least 18 total digits.

Some valid values for decimals include 4, 5.2, -6.3, or 3.14159.

There are a number of constraining attributes that can be used with the decimal type:

  • totalDigits

  • fractionDigits

  • minInclusive ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

XML Pocket Reference, 3rd Edition

XML Pocket Reference, 3rd Edition

Simon St. Laurent, Michael Fitzgerald
Essential XML: Beyond Markup

Essential XML: Beyond Markup

Don Box, Aaron Skonnard, John Lam

Publisher Resources

ISBN: 078972748XPurchase book