2

I had a problem in upgrading the Microsoft XML core for my application from msxml3.dll to msxml6.dll. I chnaged the vcproj, and the header file of mine to point to the msxml6 header and library file. I also changed the class id of msxml6 to create a document praser using CoCreateVariant() function.

During execution i found my application throws unexception handling and aborts. Then i debugged with Visual studio and found that getElementByTagName() function returns a null pointer while using the msxml6.dll library which in-turn further reference cause abort and it's working fine with msxml3.dll.

Is anyone know why this "unhandled exception" was there due to msxml6.dll? And How can i fix it?

skaffman
  • 398,947
  • 96
  • 818
  • 769
Santhosh77
  • 73
  • 9

1 Answers1

0

Can you double check if the element has namespace? Probably this is because of the behavioral changes between MSXML3 and MSXML6 where MSXML6 is more compliant in terms of namespace. To fix this issue, you may want to use XPath instead.

Samuel Zhang
  • 1,290
  • 8
  • 14
  • Thanks Samuel. Yes you are correct i am tring to upgrade msxml3.dll to msxml6.dll. The appplication that i had is completely written in C++. As there was more memory leak that i find in msxml3.dll, I feel better to upgrade it to msxml6.dll. Could you elaborate how to use Xpath to fix this error? – Santhosh77 Dec 03 '10 at 03:59
  • XPath is namespace aware so you can use selectSingleNode and selectNodes to get the nodes you want. You may search MSDN for detailed documentation. – Samuel Zhang Dec 07 '10 at 01:15