http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Xerces Project

Overview
Charter
Release Info
Advisories
Download

Xerces-C++ 3.2.5
Installation
Build Instructions

Programming
Samples
FAQs

API Reference
DOM C++ Binding
Migration Guide

Feedback
Bug-Reporting
Mailing Lists

Source Repository
Applications

Questions
 


Why do I get compilation error saying DOMDocument was declared twice using Microsoft Visual C++?
 

Your application somehow has picked up the Microsoft SDK header Msxml.h which has its own typedef of DOMDocument. This confuses with the Xerces-C++ 3.2.5 xercesc::DOMDocument and thus lead to the compilation errors.

Qualifier the use of DOMDocument in your application explicitly e.g.,

xercesc::DOMDocument* doc;

will eliminate these compilation problems. Alternatively, you may want to get rid of the Msxml.h header inclusion.


Why does my application give unresolved linking errors?
 

Please check the following:

  1. Verify that you have specified the appropriate option and library path in the linker command line
  2. If you're using the binary build of Xerces-C++, make sure that the CPU architecture, OS, and compiler are the same as the ones used to build the application. Different OS and compiler versions might cause unresolved linking problems or compilation errors. If the versions are different, rebuild the Xerces-C++ library on your system before building your application.
  3. If you are using Microsoft Visual Studio 2003 (7.1), 2005 (8.0), or 2008 (9.0), check that the "Treat wchar_t as a built-in type" option has been set to the same value as used to build Xerces-C++. The binary distribution for Visual Studio 7.1 is built with this option turned off. The binary distributions for Visual Studio 8.0 and 9.0 are built with this option turned on.

I cannot run the sample applications. What is wrong?
 

In order to run an application built using Xerces you must set up your path and library search path properly. For more information refer to the Installation instructions.


Why my document is valid on some platform while invalid on others?
 

The parser relies on the system call, strtod(), to parse a string representation of a double/float data. In the case of no invalid characters found, the strtod() returns a double/float value if it is representable on that platform, or raises ERANGE to indicate either underflow or underflow occurs. And the parser assigns zero to the said data if underflow is found.

The threshold, where the strtod() decides if an underflow occurs, varies on platforms. On Windows, it is roughly the order of e-308, on Linux, e-325, and on AIX, HP-UX and Solaris, e-324.

So in an instance document, a data of value 1.0e-310 from a type with minExclusive 0, is considered invalid on windows (since it is converted to 0 and therefore violates the minExclusive constraint), but valid on other Unix platforms (since it remains the original value).

The discussion above applies to data in xsd file as well.



Copyright © 1999-2017 The Apache Software Foundation. All Rights Reserved.