{"id":27328,"date":"2023-07-27T06:15:00","date_gmt":"2023-07-27T04:15:00","guid":{"rendered":"https:\/\/expert-only.com\/?p=27328"},"modified":"2023-10-05T17:16:20","modified_gmt":"2023-10-05T15:16:20","slug":"sql-server-xml-nodes-method","status":"publish","type":"post","link":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/","title":{"rendered":"SQL Server XML nodes method"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\" id=\"h-practical-queries-and-examples-on-how-to-use-the-sql-server-xml-nodes-method\">Practical queries and examples on how to use the SQL Server XML nodes() method. <\/h4>\n\n\n\n<p>The SQL Server landscape has steadily evolved to accommodate various data types, like the XML data type, including the nodes method. While the value() method has been a go-to for many when dealing with XML, it&#8217;s the nodes() method that allows for efficient row-wise decomposition of XML data into relational format. This guide aims to provide a detailed, technical walk-through of the XML nodes() method, explaining its capabilities, syntax, and practical applications in T-SQL.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#sql-server-xml-nodes-method-main-features\" >SQL Server XML nodes() method main features<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#create-a-sales-sable-with-an-xml-column\" >Create a sales sable with an XML column<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#populate-the-xml-sales-table\" >Populate the XML Sales table<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#generic-syntax-of-xml-nodes-in-t-sql\" >Generic syntax of XML nodes() in T-SQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#decode-multiple-products-with-the-nodes-method\" >Decode multiple products with the nodes method<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#join-xml-data-with-relational-data-in-t-sql\" >Join XML data with relational data in T-SQL<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-sql-server-xml-nodes-method-main-features\"><span class=\"ez-toc-section\" id=\"sql-server-xml-nodes-method-main-features\"><\/span>SQL Server XML nodes() method main features<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Unlike the <a href=\"https:\/\/expert-only.com\/en\/t-sql\/xml-query-method-sql-server\/\"><strong>XML query()<\/strong><\/a> and the <a href=\"https:\/\/expert-only.com\/en\/t-sql\/xml-value-method-sql-server\/\"><strong>XML value()<\/strong><\/a> methods, that we covered in previous tutorials, the nodes() method serves multiple purposes, primarily, it can:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Transform XML data into a rowset format<\/strong>, which can be easily integrated into relational tables.<\/li>\n\n\n\n<li><strong>Navigate through repetitive XML elements<\/strong> to extract values into multiple rows.<\/li>\n\n\n\n<li><strong>Facilite complex joins<\/strong> between XML data and existing relational tables.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-create-a-sales-sable-with-an-xml-column\"><span class=\"ez-toc-section\" id=\"create-a-sales-sable-with-an-xml-column\"><\/span>Create a sales sable with an XML column<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Let&#8217;s work with a Sales table similar to our earlier example. This table has an XML column named <code>SalesInfo<\/code>. Open your SQL Server Management Studio (SSMS) and execute the following code:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">CREATE TABLE Sales (\n  SalesID INT PRIMARY KEY,\n  SalesInfo XML\n);\n<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-populate-the-xml-sales-table\"><span class=\"ez-toc-section\" id=\"populate-the-xml-sales-table\"><\/span>Populate the XML Sales table<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Before diving into the technical aspects of the nodes() method, we need some sample data. We&#8217;ll insert multiple product details into the <strong><em>SalesInfo<\/em><\/strong> XML column.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">INSERT INTO Sales (SalesID, SalesInfo)\nVALUES (1, '&lt;Products>&lt;Product>&lt;Name>Laptop&lt;\/Name>&lt;Price>800&lt;\/Price>&lt;\/Product>&lt;Product>&lt;Name>Mouse&lt;\/Name>&lt;Price>20&lt;\/Price>&lt;\/Product>&lt;\/Products>');\n\nINSERT INTO Sales (SalesID, SalesInfo)\nVALUES (2, '&lt;Products>&lt;Product>&lt;Name>Smartphone&lt;\/Name>&lt;Price>500&lt;\/Price>&lt;\/Product>&lt;Product>&lt;Name>Charger&lt;\/Name>&lt;Price>15&lt;\/Price>&lt;\/Product>&lt;\/Products>');\n<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-generic-syntax-of-xml-nodes-in-t-sql\"><span class=\"ez-toc-section\" id=\"generic-syntax-of-xml-nodes-in-t-sql\"><\/span>Generic syntax of XML nodes() in T-SQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The nodes() method has a general syntax pattern like the one below:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SELECT T.C.value('(NodeName\/text())[1]', 'SQLDataType') \nFROM TableName.Column.nodes('XQueryExpression') AS T(C)\n<\/pre>\n\n\n\n<p>Let&#8217;s breakdown the different arguments of the previous piece of code: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>T.C.value<\/strong>: This is the column alias, <code>T<\/code>, and the XML column alias, <code>C<\/code>.<\/li>\n\n\n\n<li><strong>XQueryExpression<\/strong>: The XPath expression that specifies the nodes to be targeted.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-decode-multiple-products-with-the-nodes-method\"><span class=\"ez-toc-section\" id=\"decode-multiple-products-with-the-nodes-method\"><\/span>Decode multiple products with the nodes method<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Let&#8217;s say you want to unpack the <strong><em>Products<\/em><\/strong> <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/XML\/XML_introduction\" target=\"_blank\" rel=\"noreferrer noopener\">XML<\/a> into individual rows, extracting the <code>Name<\/code> and <code>Price<\/code> of each product. Here&#8217;s how:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SELECT T.C.value('(Name\/text())[1]', 'VARCHAR(50)') AS ProductName,\n       T.C.value('(Price\/text())[1]', 'FLOAT') AS ProductPrice\nFROM   Sales\nCROSS APPLY SalesInfo.nodes('\/Products\/Product') AS T(C)\nWHERE  SalesID = 1;\n<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-join-xml-data-with-relational-data-in-t-sql\"><span class=\"ez-toc-section\" id=\"join-xml-data-with-relational-data-in-t-sql\"><\/span>Join XML data with relational data in T-SQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The nodes() method is practical when you need to perform more complex tasks, like <strong>joining XML data with existing relational tables<\/strong>.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-- Assuming a Products table exists\nSELECT P.ProductName, T.C.value('(Price\/text())[1]', 'FLOAT') AS SalesPrice\nFROM   Sales\nINNER JOIN  Products P ON P.ProductName = T.C.value('(Name\/text())[1]', 'VARCHAR(50)')\nCROSS APPLY SalesInfo.nodes('\/Products\/Product') AS T(C)\nWHERE SalesID = 1;\n<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-conclusion-about-the-t-sql-nodes-method\">Conclusion about the T-SQL nodes method<\/h3>\n\n\n\n<p>The SQL Server XML nodes method is a powerful tool to transform XML data into a relational format, enabling intricate queries and joins with existing tables. As databases continue to evolve, incorporating both structured and semi-structured data, mastering XML methods like <code>nodes()<\/code> becomes increasingly important for modern database professionals.<\/p>\n\n\n\n<p>To go further, check out this <a href=\"https:\/\/expert-only.com\/en\/t-sql\/xml-data-in-sql-server\/\"><strong>overview of the XML data types and queries using T-SQL<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-wp-embed is-provider-sql-and-it-tutorials wp-block-embed-sql-and-it-tutorials\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"E3jA3r9UTq\"><a href=\"https:\/\/expert-only.com\/en\/t-sql\/xml-data-in-sql-server\/\">How to use XML data type in SQL Server with examples?<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;How to use XML data type in SQL Server with examples?&#8221; &#8212; SQL and IT Tutorials\" src=\"https:\/\/expert-only.com\/en\/t-sql\/xml-data-in-sql-server\/embed\/#?secret=HvWByPolPk#?secret=E3jA3r9UTq\" data-secret=\"E3jA3r9UTq\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Practical queries and examples on how to use the SQL Server XML nodes() method. The SQL Server landscape has steadily evolved to accommodate various data types, like the XML data type, including the nodes method. While the value() method <a class=\"mh-excerpt-more\" href=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/\" title=\"SQL Server XML nodes method\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":10619,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[454],"tags":[],"class_list":{"0":"post-27328","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-t-sql"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.7 (Yoast SEO v26.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL Server XML nodes method - T-SQL<\/title>\n<meta name=\"description\" content=\"Use the SQL Server nodes method to navigate through repetitive XML elements, integrate and join with relational tables using T-SQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server XML nodes method\" \/>\n<meta property=\"og:description\" content=\"Use the SQL Server nodes method to navigate through repetitive XML elements, integrate and join with relational tables using T-SQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL and IT Tutorials\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-27T04:15:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-05T15:16:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/digitization-FD44BBF7CF9_1920x1080.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Expert-Only\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@expert_only\" \/>\n<meta name=\"twitter:site\" content=\"@expert_only\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Expert-Only\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/\"},\"author\":{\"name\":\"Expert-Only\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\"},\"headline\":\"SQL Server XML nodes method\",\"datePublished\":\"2023-07-27T04:15:00+00:00\",\"dateModified\":\"2023-10-05T15:16:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/\"},\"wordCount\":420,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/digitization-FD44BBF7CF9_1920x1080.jpg\",\"articleSection\":[\"T-SQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/\",\"url\":\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/\",\"name\":\"SQL Server XML nodes method - T-SQL\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/digitization-FD44BBF7CF9_1920x1080.jpg\",\"datePublished\":\"2023-07-27T04:15:00+00:00\",\"dateModified\":\"2023-10-05T15:16:20+00:00\",\"description\":\"Use the SQL Server nodes method to navigate through repetitive XML elements, integrate and join with relational tables using T-SQL.\",\"breadcrumb\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#primaryimage\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/digitization-FD44BBF7CF9_1920x1080.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/digitization-FD44BBF7CF9_1920x1080.jpg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"en\",\"item\":\"https:\/\/expert-only.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server XML nodes method\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/expert-only.com\/en\/#website\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"name\":\"SQL and IT Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/expert-only.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/expert-only.com\/en\/#organization\",\"name\":\"Expert-Only\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"width\":381,\"height\":174,\"caption\":\"Expert-Only\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\",\"https:\/\/x.com\/expert_only\",\"https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\",\"name\":\"Expert-Only\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"caption\":\"Expert-Only\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Server XML nodes method - T-SQL","description":"Use the SQL Server nodes method to navigate through repetitive XML elements, integrate and join with relational tables using T-SQL.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server XML nodes method","og_description":"Use the SQL Server nodes method to navigate through repetitive XML elements, integrate and join with relational tables using T-SQL.","og_url":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/","og_site_name":"SQL and IT Tutorials","article_publisher":"https:\/\/www.facebook.com\/ExpertOnlyCom\/","article_published_time":"2023-07-27T04:15:00+00:00","article_modified_time":"2023-10-05T15:16:20+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/digitization-FD44BBF7CF9_1920x1080.jpg","type":"image\/jpeg"}],"author":"Expert-Only","twitter_card":"summary_large_image","twitter_creator":"@expert_only","twitter_site":"@expert_only","twitter_misc":{"Written by":"Expert-Only","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#article","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/"},"author":{"name":"Expert-Only","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef"},"headline":"SQL Server XML nodes method","datePublished":"2023-07-27T04:15:00+00:00","dateModified":"2023-10-05T15:16:20+00:00","mainEntityOfPage":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/"},"wordCount":420,"commentCount":0,"publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"image":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/digitization-FD44BBF7CF9_1920x1080.jpg","articleSection":["T-SQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/","url":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/","name":"SQL Server XML nodes method - T-SQL","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#primaryimage"},"image":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/digitization-FD44BBF7CF9_1920x1080.jpg","datePublished":"2023-07-27T04:15:00+00:00","dateModified":"2023-10-05T15:16:20+00:00","description":"Use the SQL Server nodes method to navigate through repetitive XML elements, integrate and join with relational tables using T-SQL.","breadcrumb":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#primaryimage","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/digitization-FD44BBF7CF9_1920x1080.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/digitization-FD44BBF7CF9_1920x1080.jpg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/expert-only.com\/en\/t-sql\/sql-server-xml-nodes-method\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"en","item":"https:\/\/expert-only.com\/en\/"},{"@type":"ListItem","position":2,"name":"SQL Server XML nodes method"}]},{"@type":"WebSite","@id":"https:\/\/expert-only.com\/en\/#website","url":"https:\/\/expert-only.com\/en\/","name":"SQL and IT Tutorials","description":"","publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/expert-only.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/expert-only.com\/en\/#organization","name":"Expert-Only","url":"https:\/\/expert-only.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","width":381,"height":174,"caption":"Expert-Only"},"image":{"@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ExpertOnlyCom\/","https:\/\/x.com\/expert_only","https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA"]},{"@type":"Person","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef","name":"Expert-Only","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","caption":"Expert-Only"}}]}},"_links":{"self":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/27328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/comments?post=27328"}],"version-history":[{"count":13,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/27328\/revisions"}],"predecessor-version":[{"id":27341,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/27328\/revisions\/27341"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media\/10619"}],"wp:attachment":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media?parent=27328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/categories?post=27328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/tags?post=27328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}