I've got some XML like this:
I want the "FreeFormText" data ("Public initiator terminated ...) I've tried every XQuery/XPath statement I could think of but nothing's been working. It seems like this should work since I do something similar with a different bit of XML:
The only obvious difference is that the other file doesn't include the XML version tags.
What am I missing? If it helps to know, I'm working with the XML in a SQL stored procedure.
Code:
<?xml version="1.0"?>
<BTARNException xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL] xmlns:xsd="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL] xmlns="[URL unfurl="true"]http://schemas.microsoft.com/biztalk/btarn/2004/BTARNException">[/URL]
<ExceptionDescription>
<errorClassification>
<GlobalMessageExceptionCode>TimeoutOnSignal</GlobalMessageExceptionCode>
</errorClassification>
<errorDescription>
<FreeFormText>Public initiator terminated on time out to receive a signal for the Async action message.</FreeFormText>
</errorDescription>
<offendingMessageComponent>
<GlobalMessageComponentCode>PublicInitiatorProcess</GlobalMessageComponentCode>
</offendingMessageComponent>
</ExceptionDescription>
<GlobalExceptionTypeCode>Exception Message</GlobalExceptionTypeCode>
</BTARNException>
I want the "FreeFormText" data ("Public initiator terminated ...) I've tried every XQuery/XPath statement I could think of but nothing's been working. It seems like this should work since I do something similar with a different bit of XML:
Code:
@xml.query('BTARNException/ExceptionDescription/errorDescription/FreeFormText/text()')
What am I missing? If it helps to know, I'm working with the XML in a SQL stored procedure.