Select the product you need help with
You receive a NULL value when you use XQuery to retrieve the value of an XML element in SQL Server 2005Article ID: 914638 - View products that this article applies to. Bug #: 20011171 (SQLBUDT) On This PageSYMPTOMSYou receive a NULL value when use XQuery to retrieve the value of an XML element when the following conditions are true:
CAUSEThis problem occurs because the value of an XML element is processed as an inline value to the XML element when the XML element is declared as a complex type that has simple content and mixed content. Therefore, the data function cannot retrieve the typed value of the XML element. Typically, the value of the XML element is processed as the typed value of the child of the XML element. RESOLUTIONService pack informationTo resolve this problem, obtain the latest service pack for Microsoft SQL Server 2005. For more information, click the following article number to view the article in the Microsoft Knowledge Base:913089
(http://support.microsoft.com/kb/913089/
)
How to obtain the latest service pack for SQL Server 2005
WORKAROUNDTo work around this problem, follow these steps:
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Microsoft SQL Server 2005 Service Pack 1. MORE INFORMATIONFor a complex type that has simple content, we do not recommend that you set the value of the mixed attribute of the complex type to true. The specification on the XML schema structures that is available on the World Wide Web Consortium (W3C) Web site also discusses this issue. For more information, see the "3.4.3" section and the "3.4.4" section in the following Web site: http://www.w3.org/TR/xmlschema-1/#Complex_Type_Definitions
(http://www.w3.org/TR/xmlschema-1/#Complex_Type_Definitions)
Steps to reproduce the problem
However, the output is expected to be similar to the following: REFERENCESFor more information about the data function for XQuery, visit the following Microsoft Developer Network (MSDN) Web site: http://msdn2.microsoft.com/en-us/library/ms187038.aspx
(http://msdn2.microsoft.com/en-us/library/ms187038.aspx)
PropertiesArticle ID: 914638 - Last Review: April 6, 2006 - Revision: 2.3 APPLIES TO
|


Back to the top








