Microsoft Knowledge Base Email Alertz

KBAlertz.com: (255953) - MSXML.dll version 5.0.2314 is included with Internet Explorer 5.0, MSXML.dll version 5.0.2919.6303 is included with Internet Explorer 5.01, and MSXML.dll version 5.0.2920 is included in Windows 2000. When it calls LoadXML for an invalid XML document...

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 255953 - Last Review: October 12, 2005 - Revision: 2.6

FIX: LoadXML Returns S_FALSE for Invalid XML Document

This article was previously published under Q255953

SYMPTOMS

MSXML.dll version 5.0.2314 is included with Internet Explorer 5.0, MSXML.dll version 5.0.2919.6303 is included with Internet Explorer 5.01, and MSXML.dll version 5.0.2920 is included in Windows 2000.

When it calls LoadXML for an invalid XML document via IDispatch::Invoke(), MSXML.dll in Internet Explorer 5.0 returns S_OK. The same operation with Internet Explorer 5.01 and Windows 2000 MSXML.dll returns S_FALSE, which may cause applications (for example, Visual FoxPro) that depend on the result S_OK, to fail.

In Visual FoxPro, this bug causes an unhandled COM exception (OLE Error 1) whenever a nonexistent node, attribute, collection, or element is accessed. These operations should normally return NULL, but instead the Error 1 is raised and no value is returned.

The following code provides a simple reproduction scenario:
lcXML = [<?xml version="1.0"?><root><data>somedata</data></root>]
loXML = CREATEOBJECT("Microsoft.XMLDOM")
loXML.loadXML(lcXML)
? loXML.parseError.reason	&& COM exception
loDocRoot = loXML.documentElement
lcValue = loDocRoot.selectSingleNode("data")	&& returns some data
lcValue = loDocRoot.selectSingleNode("notthere") && COM exception
				
When the line "? loXML.parseError.reason && COM exception" tries to access the parseError object, which has not been initialized, a COM exception occurs. The proper result for this type of operation would be a blank string. Note that any properties of the object will cause this failure. Additionally, the result of the last line of code should be a NULL value stored in lcValue, but instead the COM exception occurs and lcValue is left unchanged.

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Data Access Components service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)
NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix should have the following file attributes or later:
   Date      Version       Size            File name    
   -------------------------------------------------

   2/2/00    5.0.3014.200  522,000 bytes   msxml.dll
				

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

The fix is included with MSXML 2.5 Service Pack 1 and Windows 2000 Service Pack 1.

APPLIES TO
  • Microsoft Visual FoxPro 6.0 Professional Edition
  • Microsoft XML Parser 2.5
Keywords: 
kbhotfixserver kbqfe kbbug kbfix kbmsxmlnosweep kbqfe KB255953
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please