![]() |
|
|
Importing MSXML Definitions in VC++ 6.0
Capturing Validation ErrorsIn order to "see" a validation error, you must set the IXMLDOMNode::appendChild / insertBefore / removeChildThese two methods can have unexpected results. If you move a node from one document to another, MSXML performs several operations to make sure the node makes "sense" in its new home, including:
Item #2 completely surprised me. Seeing attributes disappear was alarming and looked like a bug. But no, it's as-designed. One way to avoid this problem is to convert the source document to a string and re-parse it without the DTD declaration. Slow but effective. More details are here Passing MSXML Objects Across ApartmentsMixing Threading ModelsYou can not move a node from a neutral-threaded DOM (Micorosft.XMLDOM) into a free-threaded DOM (Microsoft.FreeThreadedXMLDOM) and vice-versa. You must reparse the source document using the same thread model as the target document. The error is 0x80004005 XMLOM_INVALID_MODEL. Similarly, you can not transform a neutral-threaded DOM using a stylesheet that's in a free-threaded DOM and vice-versa. Using XPATH in selectNodes, selectSingleNodeIf you want MSXML3 to use XPATH instead of "MS patterns" in
methods like
|