Microsoft KB Archive/301939

= How To Add MSXML Support to a C++ Application =

Article ID: 301939

Article Last Modified on 9/10/2004

-

APPLIES TO


 * Microsoft Windows CE eMbedded Visual C++, Version:4.0 3.0
 * Microsoft Windows CE Platform Software Development Kit for Handheld PC 2000

-



This article was previously published under Q301939



SUMMARY
Some Windows CE-based platforms include support for the Microsoft XML component, but no examples of calling the XML component from C++ on Windows CE platforms are available in the online documentation. Many of the existing desktop examples will not work because they utilize the COM compiler extensions (through the #import statement) which are not currently supported in the Windows CE development environment. This article describes what is necessary to incorporate XML support



MORE INFORMATION
The MSXML component is declared in the MSXML.h file. This includes everything that is necessary to access the component including:
 * Class and interface identifiers
 * Interface declarations

To use these declarations, you can simply include the MSXML.h file in any source files that access the component. If you are porting desktop code that accesses the component through a namespace, you can achieve a similar effect, without needing to edit all of the scoped references to the namespace, by including MSXML.h in a namespace. For example, if the code you are porting accesses the IXMLDOMDocument interface like this

MSXML::IXMLDOMDocument

the MSXML component is declared in the MSXML namespace. You can achieve the same effect in Windows CE by including MSXML.h as follows: namespace MSXML { } To link the application, include Uuid.lib in the list of linker object/library modules.
 * 1) include 

