wiki:FdoXmlWriterWriteDouble

FDO XmlWriter WriteDouble Support

Overview

There are a number of places in the FDO API and Provider source code where conversions are made from doubles to string in order to write the values to an XML file using WriteString. When a double value is written to a XML file, it must be converted to string using dot even if the current locale uses a different character.

To solve this issue, new functions will be added to FdoXmlWriter which can write doubles values to XML, thus removig the requirement on the client to determine the locale.

API Changes

Writing doubles will be supported by adding a WriteAttribute (string Name, double Value) and a WriteDouble (string Name, double Value) function to FdoXmlWriter. These two functions will use an internal function to convert a double to string and after conversion the function must trim all ‘0’ values from the right part of the string.

FDO_API_COMMON void WriteAttribute( FdoString* attributeName, FdoDouble attributeValue );
FDO_API_COMMON void WriteDouble(FdoDouble value );

Optional functions:

FDO_API_COMMON void WriteAttribute( FdoString* attributeName, FdoInt64 attributeValue );
FDO_API_COMMON void WriteInt(FdoInt64 value );

Issues

Should we add a function to convert a XML string to double (independent of locale) in reader?

Last modified 17 years ago Last modified on 10/18/07 08:20:33
Note: See TracWiki for help on using the wiki.