{"id":127,"date":"2020-11-02T15:19:35","date_gmt":"2020-11-02T15:19:35","guid":{"rendered":"http:\/\/naveedulhaq.com\/?p=127"},"modified":"2021-01-24T18:16:55","modified_gmt":"2021-01-24T18:16:55","slug":"read-large-xml-file-in-net-c","status":"publish","type":"post","link":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/","title":{"rendered":"Read large XML file in .NET (C#)"},"content":{"rendered":"\n<p>This article shows how you can read nested and complex large XML file using XmlReader. <\/p>\n\n\n\n<p>few benefits of using XmlReader<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>XmlReader reads data in a forward-only and read-only fashion. That&#8217;s why it is faster than loading XML in memory and read node by node. <\/li><li>XmlReader reads line by line.<\/li><li>You can use ReadState property to check the current state of the reader. <\/li><li>You can define XMLReaderSettings to customize reader behavior. (see below example)<\/li><\/ul>\n\n\n\n<p><strong>Sample Xml<\/strong><\/p>\n\n\n\n<pre><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;cafProductFeed&gt;\n&lt;datafeed id=\"7858\" merchantId=\"7858\" merchantName=\"SampleMerchant\"&gt;\n&lt;prod id=\"672553505\" in_stock=\"yes\" is_for_sale=\"yes\" pre_order=\"no\" stock_quantity=\"2\" web_offer=\"no\"&gt;\n\t&lt;brand\/&gt;\n\t&lt;cat&gt;\n\t\t&lt;mCat&gt;B2C_2&lt;\/mCat&gt;\n\t&lt;\/cat&gt;\n\t&lt;price curr=\"GBP\"&gt;\n\t\t&lt;buynow&gt;33.99&lt;\/buynow&gt;\n\t\t&lt;rrp&gt;0.00&lt;\/rrp&gt;\n\t\t&lt;store&gt;0.00&lt;\/store&gt;\n\t&lt;\/price&gt;\n\t&lt;text&gt;\n\t\t&lt;name&gt;Laptop Memory&lt;\/name&gt;\n\t&lt;\/text&gt;\n\t&lt;uri&gt;\n\t\t&lt;track&gt;link&lt;\/track&gt;\n\t\t&lt;mImage&gt;link&lt;\/mImage&gt;\n\t\t&lt;mLink&gt;link&lt;\/mLink&gt;\n\t&lt;\/uri&gt;\n\t&lt;vertical\/&gt;\n\t&lt;pId&gt;387912&lt;\/pId&gt;\n\t&lt;delTime&gt;Free Delivery&lt;\/delTime&gt;\n\t&lt;lastUpdated&gt;2020-11-02 09:58:02&lt;\/lastUpdated&gt;\n\t&lt;mpn&gt;KVR16S11\/8&lt;\/mpn&gt;\n&lt;\/prod&gt;\n\/\/more prod nodes\n&lt;\/datafeed&gt;\n&lt;\/cafProductFeed&gt;\n<\/code><\/pre>\n\n\n\n<p>Steps ..<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Define XMLReaderSettings (optional)<\/li><li>Create XMLReader (XmlReader.Create)<\/li><li>Read Reader (reader.Read())<\/li><\/ul>\n\n\n\n<p><strong>Read attributes<\/strong><\/p>\n\n\n\n<p>As I have discussed before reader read line by line. When the reader reading any node you can get its attributes by following the command. Such as <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>reader.GetAttribute(\"in_stock\")<\/code><\/pre>\n\n\n\n<p><strong>Read Sub nodes<\/strong><\/p>\n\n\n\n<pre><code>if (reader.Name == \"pId\")\n{\n    product.MerchantProdId = reader.ReadInnerXml();\n}<\/code><\/pre>\n\n\n\n<p><strong>Example code<\/strong><\/p>\n\n\n\n<pre><code>        public static List&lt;Product&gt; Products(string filePath)\n        {\n            XmlReaderSettings settings = new XmlReaderSettings();\n            settings.DtdProcessing = DtdProcessing.Parse;\n            settings.IgnoreWhitespace = true;\n            var results = new List&lt;Product&gt;();\n            var product = new Product();\n            var merchantName = string.Empty;\n            int merchantId = 0;\n            long ean = 0;\n            long upc = 0;\n            long mpn = 0;\n\n            using (XmlReader reader = XmlReader.Create(filePath, settings))\n            {\n                while (reader.Read())\n                {\n                    if (reader.NodeType == XmlNodeType.Element)\n                    {\n                        if (reader.Name == \"prod\")\n                        {\n                            if (product.SupplierProdId &gt; 0 &amp;&amp; (!string.IsNullOrEmpty(product.Mpn) || !string.IsNullOrEmpty(product.Ean) || !string.IsNullOrEmpty(product.Upc)))\n                                results.Add(product);\n\n                            long id;\n                            long.TryParse(reader.GetAttribute(\"id\"), out id);\n\n                            int stock;\n                            int.TryParse(reader.GetAttribute(\"stock_quantity\"), out stock);\n\n                            product = new Product\n                            {\n                                SupplierProdId = id,\n                                InStock = reader.GetAttribute(\"in_stock\") == \"yes\",\n                                IsForSale = reader.GetAttribute(\"is_for_sale\") == \"yes\",\n                                PreOrder = reader.GetAttribute(\"pre_order\") == \"yes\",\n                                WebOffer = reader.GetAttribute(\"web_offer\") == \"yes\",\n                                StockQuantity = stock\n\n                            };\n                        }\n\n                        if (reader.Name == \"pId\")\n                        {\n                            product.MerchantProdId = reader.ReadInnerXml();\n                        }\n\n                        if (reader.Name == \"mpn\")\n                        {\n                            var strMpn = reader.ReadInnerXml();\n                            long.TryParse(strMpn, out mpn);\n                            if (mpn &gt; 0)\n                            {\n                                product.Ean = strMpn;\n                            }\n                            else\n                            {\n                                product.Mpn = strMpn;\n\n                            }\n                        }\n\n                        if (reader.Name == \"ean\")\n                        {\n                            var strEan = reader.ReadInnerXml();\n                            long.TryParse(strEan, out ean);\n\n                            if (ean &lt;= 0)\n                                product.Mpn = strEan;\n                            else\n                                product.Ean = strEan;\n                        }\n\n                        if (reader.Name == \"upc\")\n                        {\n                            var strUpc = reader.ReadInnerXml();\n                            long.TryParse(strUpc, out upc);\n\n                            if (upc &lt;= 0)\n                                product.Mpn = strUpc;\n                            else\n                                product.Upc = strUpc;\n                        }\n\n                        if (reader.Name == \"track\")\n                        {\n                            product.Url = reader.ReadInnerXml();\n                        }\n\n                        if (reader.Name == \"name\")\n                        {\n                            product.Name = reader.ReadInnerXml();\n                        }\n\n                        if (reader.Name == \"datafeed\")\n                        {\n                            int.TryParse(reader.GetAttribute(\"merchantId\"), out merchantId);\n                            merchantName = reader.GetAttribute(\"merchantName\");\n                        }\n\n                        if (reader.Name == \"price\")\n                        {\n                            product.Currency = reader.GetAttribute(\"curr\");\n                        }\n\n                        if (reader.Name == \"buynow\")\n                        {\n                            product.Price = Convert.ToDouble(reader.ReadInnerXml());\n                        }\n\n                        if (reader.Name == \"rrp\")\n                        {\n                            product.RetailPrice = Convert.ToDouble(reader.ReadInnerXml());\n                        }\n\n                        if (reader.Name == \"store\")\n                        {\n                            product.StorePrice = Convert.ToDouble(reader.ReadInnerXml());\n                        }\n\n                        product.MerchantId = merchantId;\n                        product.MerchantName = merchantName;\n                    }\n                }\n            }\n\n            return results;\n        }<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article shows how you can read nested and complex large XML file using XmlReader. few benefits of using XmlReader XmlReader reads data in a&#8230;<\/p>\n","protected":false},"author":1,"featured_media":72,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[11,8],"class_list":["post-127","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dot-net-core","tag-dot-net-core","tag-dot-net-framework"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Read large XML file in .NET (C#) - Naveed Ul-Haq&#039;s blog<\/title>\n<meta name=\"description\" content=\"Read large XML file in .NET (C#) - Naveed Ul-Haq&#039;s blog - EPISERVER, .NEt framework, .NET CORE, CLOUD (AZURE, AWS) &amp; MORE\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Read large XML file in .NET (C#) - Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"og:description\" content=\"Read large XML file in .NET (C#) - Naveed Ul-Haq&#039;s blog - EPISERVER, .NEt framework, .NET CORE, CLOUD (AZURE, AWS) &amp; MORE\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/\" \/>\n<meta property=\"og:site_name\" content=\"Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-02T15:19:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-01-24T18:16:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2019\/04\/240px-.NET_Core_Logo.svg_.png\" \/>\n\t<meta property=\"og:image:width\" content=\"240\" \/>\n\t<meta property=\"og:image:height\" content=\"240\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Naveed Ul-Haq\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Naveed Ul-Haq\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/read-large-xml-file-in-net-c\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/read-large-xml-file-in-net-c\\\/\"},\"author\":{\"name\":\"Naveed Ul-Haq\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"headline\":\"Read large XML file in .NET (C#)\",\"datePublished\":\"2020-11-02T15:19:35+00:00\",\"dateModified\":\"2021-01-24T18:16:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/read-large-xml-file-in-net-c\\\/\"},\"wordCount\":129,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/read-large-xml-file-in-net-c\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/240px-.NET_Core_Logo.svg_.png\",\"keywords\":[\".net core\",\".net framework\"],\"articleSection\":[\".NET\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/read-large-xml-file-in-net-c\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/read-large-xml-file-in-net-c\\\/\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/read-large-xml-file-in-net-c\\\/\",\"name\":\"Read large XML file in .NET (C#) - Naveed Ul-Haq&#039;s blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/read-large-xml-file-in-net-c\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/read-large-xml-file-in-net-c\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/240px-.NET_Core_Logo.svg_.png\",\"datePublished\":\"2020-11-02T15:19:35+00:00\",\"dateModified\":\"2021-01-24T18:16:55+00:00\",\"description\":\"Read large XML file in .NET (C#) - Naveed Ul-Haq's blog - EPISERVER, .NEt framework, .NET CORE, CLOUD (AZURE, AWS) & MORE\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/read-large-xml-file-in-net-c\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/read-large-xml-file-in-net-c\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/read-large-xml-file-in-net-c\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/240px-.NET_Core_Logo.svg_.png\",\"contentUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/240px-.NET_Core_Logo.svg_.png\",\"width\":240,\"height\":240,\"caption\":\".net core\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/read-large-xml-file-in-net-c\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.naveedulhaq.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Read large XML file in .NET (C#)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#website\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/\",\"name\":\"Naveed Ul-Haq's blog\",\"description\":\"AI, Optimizely, Azure &amp; more\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.naveedulhaq.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\",\"name\":\"Naveed Ul-Haq\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"caption\":\"Naveed Ul-Haq\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\"},\"description\":\"I lead engineering delivery teams for digital commerce and digital experience platforms, combining hands-on architecture experience with strong delivery governance. Over 20+ years, I\u2019ve built and led cross\u2011functional teams (engineering, BA, QA) delivering modern cloud solutions on Azure, microservices, APIs and eCommerce\\\/CMS platforms. My recent focus includes AI-enabled commerce automation: product ingestion and enrichment workflows, content optimisation for SEO and shopping feeds, and agentic tooling to improve marketing and accessibility workflows. I\u2019m passionate about building high-performing teams, establishing quality\\\/release standards, and delivering measurable outcomes across performance, reliability, and speed of change.\",\"sameAs\":[\"https:\\\/\\\/www.naveedulhaq.com\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/naveedulhaq\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Read large XML file in .NET (C#) - Naveed Ul-Haq&#039;s blog","description":"Read large XML file in .NET (C#) - Naveed Ul-Haq's blog - EPISERVER, .NEt framework, .NET CORE, CLOUD (AZURE, AWS) & MORE","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:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/","og_locale":"en_GB","og_type":"article","og_title":"Read large XML file in .NET (C#) - Naveed Ul-Haq&#039;s blog","og_description":"Read large XML file in .NET (C#) - Naveed Ul-Haq's blog - EPISERVER, .NEt framework, .NET CORE, CLOUD (AZURE, AWS) & MORE","og_url":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/","og_site_name":"Naveed Ul-Haq&#039;s blog","article_published_time":"2020-11-02T15:19:35+00:00","article_modified_time":"2021-01-24T18:16:55+00:00","og_image":[{"width":240,"height":240,"url":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2019\/04\/240px-.NET_Core_Logo.svg_.png","type":"image\/png"}],"author":"Naveed Ul-Haq","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Naveed Ul-Haq","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/#article","isPartOf":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/"},"author":{"name":"Naveed Ul-Haq","@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"headline":"Read large XML file in .NET (C#)","datePublished":"2020-11-02T15:19:35+00:00","dateModified":"2021-01-24T18:16:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/"},"wordCount":129,"commentCount":1,"publisher":{"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"image":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/#primaryimage"},"thumbnailUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2019\/04\/240px-.NET_Core_Logo.svg_.png","keywords":[".net core",".net framework"],"articleSection":[".NET"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/","url":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/","name":"Read large XML file in .NET (C#) - Naveed Ul-Haq&#039;s blog","isPartOf":{"@id":"https:\/\/www.naveedulhaq.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/#primaryimage"},"image":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/#primaryimage"},"thumbnailUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2019\/04\/240px-.NET_Core_Logo.svg_.png","datePublished":"2020-11-02T15:19:35+00:00","dateModified":"2021-01-24T18:16:55+00:00","description":"Read large XML file in .NET (C#) - Naveed Ul-Haq's blog - EPISERVER, .NEt framework, .NET CORE, CLOUD (AZURE, AWS) & MORE","breadcrumb":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/#primaryimage","url":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2019\/04\/240px-.NET_Core_Logo.svg_.png","contentUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2019\/04\/240px-.NET_Core_Logo.svg_.png","width":240,"height":240,"caption":".net core"},{"@type":"BreadcrumbList","@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/read-large-xml-file-in-net-c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.naveedulhaq.com\/"},{"@type":"ListItem","position":2,"name":"Read large XML file in .NET (C#)"}]},{"@type":"WebSite","@id":"https:\/\/www.naveedulhaq.com\/#website","url":"https:\/\/www.naveedulhaq.com\/","name":"Naveed Ul-Haq's blog","description":"AI, Optimizely, Azure &amp; more","publisher":{"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.naveedulhaq.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9","name":"Naveed Ul-Haq","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","caption":"Naveed Ul-Haq"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g"},"description":"I lead engineering delivery teams for digital commerce and digital experience platforms, combining hands-on architecture experience with strong delivery governance. Over 20+ years, I\u2019ve built and led cross\u2011functional teams (engineering, BA, QA) delivering modern cloud solutions on Azure, microservices, APIs and eCommerce\/CMS platforms. My recent focus includes AI-enabled commerce automation: product ingestion and enrichment workflows, content optimisation for SEO and shopping feeds, and agentic tooling to improve marketing and accessibility workflows. I\u2019m passionate about building high-performing teams, establishing quality\/release standards, and delivering measurable outcomes across performance, reliability, and speed of change.","sameAs":["https:\/\/www.naveedulhaq.com","https:\/\/www.linkedin.com\/in\/naveedulhaq\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts\/127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":0,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts\/127\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/media\/72"}],"wp:attachment":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/categories?post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/tags?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}