Recently, we were working on XML having namespace and we need to read that XML to fetch the information from the XML. Here, is the Sample XML which we are trying to parse: DECLARE @x XML If we need to fetch the “info” element with T-SQL we can write query as follows: ;WITH XMLNAMESPACES(DEFAULT 'http://schemas.microsoft.com/search/local/ws/rest/v1') Here, we have to use “WITH XMLNAMESPACES”, so we can specify the namespace of the XML that we are reading, else it wont give us any result. |
July 8, 2013
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment