<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ayoub Kharbouch</title>
    <description>The latest articles on DEV Community by Ayoub Kharbouch (@ayoub_kharbouch_6d1ecff6c).</description>
    <link>https://dev.to/ayoub_kharbouch_6d1ecff6c</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4202803%2F25faf95d-01bb-4cac-bfba-d2d515b2aadb.jpeg</url>
      <title>DEV Community: Ayoub Kharbouch</title>
      <link>https://dev.to/ayoub_kharbouch_6d1ecff6c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ayoub_kharbouch_6d1ecff6c"/>
    <language>en</language>
    <item>
      <title>Replace client-side XSLT: transform XML on the server with PHP, Python or Node.js</title>
      <dc:creator>Ayoub Kharbouch</dc:creator>
      <pubDate>Mon, 09 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/ayoub_kharbouch_6d1ecff6c/replace-client-side-xslt-transform-xml-on-the-server-with-php-python-or-nodejs-3pp4</link>
      <guid>https://dev.to/ayoub_kharbouch_6d1ecff6c/replace-client-side-xslt-transform-xml-on-the-server-with-php-python-or-nodejs-3pp4</guid>
      <description>&lt;p&gt;Chrome stops applying XSL stylesheets on 17 November 2026. If your site sends XML with an XSL stylesheet, the most durable fix is to run the transformation on your server and send HTML. We ran the Python and Node.js examples below; the PHP one follows the PHP manual.&lt;/p&gt;

&lt;h2&gt;
  
  
  What replaces client-side XSLT in Chrome?
&lt;/h2&gt;

&lt;p&gt;Server-side XSLT: run the XSL transformation on your server and send the browser plain HTML. In PHP, the &lt;code&gt;XSLTProcessor&lt;/code&gt; class of the XSL extension does this; in Python, the &lt;code&gt;XSLT&lt;/code&gt; class of lxml; in Node.js, a package such as saxon-js or xslt-processor. Each one takes your XML file and your XSL file and returns an HTML string that you send as &lt;code&gt;text/html&lt;/code&gt;. It is the only route where the result no longer depends on what the browser supports.&lt;/p&gt;

&lt;p&gt;XSLT stops working in Chrome 158, on 17 November 2026. Sites in the origin trial and browsers managed with an enterprise policy keep it until Chrome 176, on 17 August 2027. Our page on the &lt;a href="https://xmlnest.com/guides/xslt-removed-from-chrome/" rel="noopener noreferrer"&gt;XSLT removal timeline in Chrome&lt;/a&gt; lists the pages affected and every option for visitors.&lt;/p&gt;

&lt;p&gt;Chrome's announcement describes these routes for site owners:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run the XSLT processing on the server and send the rendered HTML.&lt;/li&gt;
&lt;li&gt;Add the xslt-polyfill script to the XML document, so that the stylesheet is applied in the browser again.&lt;/li&gt;
&lt;li&gt;Serve JSON instead of XML and render it with JavaScript.&lt;/li&gt;
&lt;li&gt;Run XSLT in the page with a JavaScript library. The announcement names Saxonica's as the largest, with full support for XSLT 3.0.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The polyfill is the smallest change. Like a JavaScript library, it runs in every visitor's browser. Running XSLT on the server takes more work, but the browser then receives an ordinary HTML page, with no script and no extension involved. Most of this article covers that route.&lt;/p&gt;

&lt;p&gt;If you need more time, Chrome's origin trial keeps XSLT working on your site until Chrome 176, in August 2027. You register your site for the trial and add its token to your pages' responses; XML pages have no HTML &lt;code&gt;head&lt;/code&gt; for a &lt;code&gt;meta&lt;/code&gt; tag, so use the &lt;code&gt;Origin-Trial&lt;/code&gt; HTTP response header that Chrome's origin trials guide describes. If you cannot change the server at all, the polyfill remains the option.&lt;/p&gt;

&lt;h2&gt;
  
  
  Should I convert my sitemap or RSS feed to HTML?
&lt;/h2&gt;

&lt;p&gt;No. Search engines and feed readers fetch them, and they need XML at that address.&lt;/p&gt;

&lt;p&gt;Google's sitemap documentation lists the formats it accepts: XML sitemaps, RSS, mRSS and Atom 1.0, and text files. An HTML page is not one of them. If you replace &lt;code&gt;/sitemap.xml&lt;/code&gt; with HTML, you break it for search engines to fix a display problem that only affects people. Our article on &lt;a href="https://xmlnest.com/blog/wordpress-sitemap-xslt-chrome-seo/" rel="noopener noreferrer"&gt;what Google reads in a sitemap&lt;/a&gt; shows that the layout plays no part in how Google reads a WordPress sitemap.&lt;/p&gt;

&lt;p&gt;Keep the XML where it is. If people need a readable version, publish the HTML at a separate address and add a link to it. For feeds, there is also a lighter option: &lt;a href="https://xmlnest.com/blog/style-rss-feed-css-chrome/" rel="noopener noreferrer"&gt;styling feeds with CSS&lt;/a&gt; still works in Chrome.&lt;/p&gt;

&lt;p&gt;Server-side transformation fits the XML pages that exist only to be read by people, such as a product catalog styled with XSL.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why does my XSLT return an empty table for a sitemap?
&lt;/h2&gt;

&lt;p&gt;Because sitemap elements belong to a namespace, and the stylesheet has to match them with a prefix. The examples in this article use two files that build a readable copy of a sitemap, served at its own address such as &lt;code&gt;/sitemap.html&lt;/code&gt;, while &lt;code&gt;/sitemap.xml&lt;/code&gt; stays as it is. The XML is a short sitemap:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;urlset&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;"http://www.sitemaps.org/schemas/sitemap/0.9"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;url&amp;gt;&amp;lt;loc&amp;gt;&lt;/span&gt;https://example.com/&lt;span class="nt"&gt;&amp;lt;/loc&amp;gt;&amp;lt;lastmod&amp;gt;&lt;/span&gt;2026-10-14&lt;span class="nt"&gt;&amp;lt;/lastmod&amp;gt;&amp;lt;/url&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;url&amp;gt;&amp;lt;loc&amp;gt;&lt;/span&gt;https://example.com/about/&lt;span class="nt"&gt;&amp;lt;/loc&amp;gt;&amp;lt;/url&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/urlset&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The stylesheet, &lt;code&gt;sitemap.xsl&lt;/code&gt;, turns it into an HTML table:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;xsl:stylesheet&lt;/span&gt; &lt;span class="na"&gt;version=&lt;/span&gt;&lt;span class="s"&gt;"1.0"&lt;/span&gt; &lt;span class="na"&gt;exclude-result-prefixes=&lt;/span&gt;&lt;span class="s"&gt;"s"&lt;/span&gt;
  &lt;span class="na"&gt;xmlns:xsl=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/1999/XSL/Transform"&lt;/span&gt;
  &lt;span class="na"&gt;xmlns:s=&lt;/span&gt;&lt;span class="s"&gt;"http://www.sitemaps.org/schemas/sitemap/0.9"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;xsl:output&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"html"&lt;/span&gt; &lt;span class="na"&gt;encoding=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt; &lt;span class="na"&gt;indent=&lt;/span&gt;&lt;span class="s"&gt;"yes"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;xsl:template&lt;/span&gt; &lt;span class="na"&gt;match=&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Sitemap&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;table&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;xsl:for-each&lt;/span&gt; &lt;span class="na"&gt;select=&lt;/span&gt;&lt;span class="s"&gt;"s:urlset/s:url"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
              &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&amp;lt;xsl:value-of&lt;/span&gt; &lt;span class="na"&gt;select=&lt;/span&gt;&lt;span class="s"&gt;"s:loc"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
              &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&amp;lt;xsl:value-of&lt;/span&gt; &lt;span class="na"&gt;select=&lt;/span&gt;&lt;span class="s"&gt;"s:lastmod"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;/xsl:for-each&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/xsl:template&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;XSLT 1.0 takes its path expressions from the W3C XML Path Language 1.0, where a name without a prefix only matches elements in no namespace: the document's default namespace is ignored. That is why the stylesheet declares the prefix &lt;code&gt;s&lt;/code&gt; and writes &lt;code&gt;s:urlset/s:url&lt;/code&gt;. With &lt;code&gt;urlset/url&lt;/code&gt;, the table would come out empty.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;exclude-result-prefixes="s"&lt;/code&gt; attribute keeps that namespace declaration out of the HTML. Without it, in our run with lxml, the output started with &lt;code&gt;&amp;lt;html xmlns:s="..."&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;With libxslt, which the PHP and Python examples both use, the output has no DOCTYPE: our lxml run started with &lt;code&gt;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&lt;/code&gt;. MDN explains that a page needs a doctype such as &lt;code&gt;&amp;lt;!doctype html&amp;gt;&lt;/code&gt; to be rendered in standards mode rather than quirks mode. Add &lt;code&gt;doctype-system="about:legacy-compat"&lt;/code&gt; to &lt;code&gt;xsl:output&lt;/code&gt;, the legacy string that the HTML standard defines for generators like this one, and lxml then wrote &lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/code&gt;. The &lt;code&gt;indent="yes"&lt;/code&gt; attribute, by contrast, only allows the processor to add whitespace, the way an XML formatter would: libxslt added line breaks between most elements, but no indentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I run XSLT in PHP, Python or Node.js?
&lt;/h2&gt;

&lt;p&gt;PHP's XSL extension and Python's lxml both run on libxslt, which Chrome's announcement names as the XSLT library of Chromium browsers. Node.js needs a package.&lt;/p&gt;

&lt;p&gt;To try a stylesheet before you wire it into your server, paste it with a sample file into our &lt;a href="https://xmlnest.com/tools/xslt-tester/" rel="noopener noreferrer"&gt;XSLT tester&lt;/a&gt;: it runs XSLT 1.0 in your browser and shows the HTML it returns.&lt;/p&gt;

&lt;p&gt;Chrome's announcement explains the removal by security: libraries such as libxslt are complex, aging C/C++ code, prone to memory-safety bugs. On your own server, you choose what goes in: run your own stylesheets on your own XML, never a stylesheet sent by a user, and keep libxslt up to date with your system updates.&lt;/p&gt;

&lt;h3&gt;
  
  
  PHP
&lt;/h3&gt;

&lt;p&gt;Use the &lt;code&gt;XSLTProcessor&lt;/code&gt; class from PHP's XSL extension. The PHP manual says that PHP includes the extension, which is enabled with the &lt;code&gt;--with-xsl&lt;/code&gt; option when PHP is built, so first check that &lt;code&gt;php -m&lt;/code&gt; lists &lt;code&gt;xsl&lt;/code&gt;. On the PHP 8.3 we had at hand, from the official WordPress Docker image, it did not, and &lt;code&gt;XSLTProcessor&lt;/code&gt; was missing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="nv"&gt;$xml&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DOMDocument&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nv"&gt;$xml&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'sitemap.xml'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nv"&gt;$xsl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DOMDocument&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nv"&gt;$xsl&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'sitemap.xsl'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nv"&gt;$proc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;XSLTProcessor&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nv"&gt;$proc&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;importStylesheet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$xsl&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nv"&gt;$html&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$proc&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;transformToXml&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$xml&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$html&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;http_response_code&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nb"&gt;header&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Content-Type: text/html; charset=utf-8'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$html&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;transformToXml&lt;/code&gt; returns the result as a string, or &lt;code&gt;false&lt;/code&gt; on error, so the code checks it before sending any header. Since the XSL extension was missing, this example follows the manual and was not run.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python
&lt;/h3&gt;

&lt;p&gt;Install lxml with &lt;code&gt;pip install lxml&lt;/code&gt;. According to its documentation, lxml supports XSLT 1.0 through libxml2 and libxslt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;lxml&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;etree&lt;/span&gt;

&lt;span class="n"&gt;doc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;etree&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sitemap.xml&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;transform&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;etree&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;XSLT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;etree&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sitemap.xsl&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;html&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result is serialized as the stylesheet's &lt;code&gt;xsl:output&lt;/code&gt; element specifies. To get a Python text string from &lt;code&gt;str(result)&lt;/code&gt;, that element should declare UTF-8, as ours does, according to the lxml documentation. We ran this with Python 3.14.3 and lxml 6.0.2: the output was the HTML table, with two rows and an empty date cell for the second page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Node.js
&lt;/h3&gt;

&lt;p&gt;Node.js has no XSLT processor among its built-in modules, so you need a package. We tested two.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SaxonJS.&lt;/strong&gt; The saxon-js package, from Saxonica, is an XSLT 3.0 processor for Node.js. XSLT 3.0 defines a compatibility mode for stylesheets marked &lt;code&gt;version="1.0"&lt;/code&gt;, and our stylesheet ran unchanged. &lt;code&gt;SaxonJS.transform()&lt;/code&gt; takes a compiled stylesheet, a SEF file, so compile it once with the xslt3 command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;saxon-js xslt3
npx xslt3 &lt;span class="nt"&gt;-xsl&lt;/span&gt;:sitemap.xsl &lt;span class="nt"&gt;-export&lt;/span&gt;:sitemap.sef.json &lt;span class="nt"&gt;-nogo&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run it from an ES module, for example a file named &lt;code&gt;transform.mjs&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;SaxonJS&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;saxon-js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;SaxonJS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;stylesheetFileName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sitemap.sef.json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;sourceFileName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sitemap.xml&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;destination&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;serialized&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;async&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;html&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;principalResult&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The saxon-js README describes SaxonJS as free of charge, with a license that is not open source.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;xslt-processor.&lt;/strong&gt; This package is written in JavaScript, with no native dependencies. Its README shows the call: parse both files with its &lt;code&gt;XmlParser&lt;/code&gt; class, then pass them to the &lt;code&gt;xsltProcess&lt;/code&gt; method of an &lt;code&gt;Xslt&lt;/code&gt; object, which returns a promise of the result. The README warns that some features required by the standards were left out, and that the package identifies XSLT elements by their &lt;code&gt;xsl:&lt;/code&gt; prefix and ignores namespace declarations. Our sample worked with it; test your own stylesheets before you rely on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  When is the xslt-polyfill script enough?
&lt;/h2&gt;

&lt;p&gt;When you can edit the XML files but not the code that serves them. The polyfill applies the stylesheet in the browser, with JavaScript: the XSL stays as it is, and the XML only gains one script line, which our XSLT removal timeline page shows. The xslt-polyfill README adds three practical points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the script is published on npm as &lt;code&gt;xslt-polyfill&lt;/code&gt;, and you serve the file from your own site;&lt;/li&gt;
&lt;li&gt;it only applies a stylesheet that the document already links to with an &lt;code&gt;xml-stylesheet&lt;/code&gt; line;&lt;/li&gt;
&lt;li&gt;while native XSLT is on, the browser transforms the document before any script runs, so test the polyfill with XSLT turned off at &lt;code&gt;chrome://flags/#xslt&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The content type matters too. In our test with XSLT turned off, a script element placed in an RSS feed ran when the feed was sent as &lt;code&gt;application/xml&lt;/code&gt;, but not when it was sent as &lt;code&gt;application/rss+xml&lt;/code&gt;: Chrome then showed the feed as plain text. Chrome's announcement says that adding the line to a feed should not stop feed readers from parsing the XML. Google's sitemap documentation says nothing about it, so after adding it to a sitemap, check the Sitemaps report in Search Console.&lt;/p&gt;

&lt;p&gt;The trade-off is that every visitor now runs a script to see your page. With the server-side route, they receive finished HTML.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which Content-Type should the generated HTML use?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;text/html&lt;/code&gt;. MDN lists &lt;code&gt;text/html&lt;/code&gt; as the media type for HTML documents, so send &lt;code&gt;Content-Type: text/html; charset=utf-8&lt;/code&gt;, as in the PHP example. The page then works in every browser, with or without XSLT.&lt;/p&gt;

&lt;p&gt;Visitors who land on an untransformed page can already install the official XSLT Polyfill extension. &lt;a href="https://xmlnest.com/extension/" rel="noopener noreferrer"&gt;XMLNest, an XML viewer for Chrome&lt;/a&gt;, is available on the Chrome Web Store. &lt;a href="https://xmlnest.com/blog/why-i-built-xmlnest/" rel="noopener noreferrer"&gt;Why I built XMLNest&lt;/a&gt; tells the story behind it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.chrome.com/docs/web-platform/deprecating-xslt" rel="noopener noreferrer"&gt;Chrome for Developers: Removing XSLT for a more secure browser&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.chrome.com/docs/web-platform/origin-trials" rel="noopener noreferrer"&gt;Chrome for Developers: Get started with origin trials&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/mfreed7/xslt_polyfill" rel="noopener noreferrer"&gt;XSLT Polyfill, README of mfreed7/xslt_polyfill on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/TR/1999/REC-xslt-19991116" rel="noopener noreferrer"&gt;W3C: XSL Transformations (XSLT) Version 1.0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#node-tests" rel="noopener noreferrer"&gt;W3C: XML Path Language Version 1.0, Node Tests&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/TR/xslt-30/#backwards-1.0" rel="noopener noreferrer"&gt;W3C: XSL Transformations (XSLT) Version 3.0, XSLT 1.0 Compatibility Mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://html.spec.whatwg.org/multipage/syntax.html#the-doctype" rel="noopener noreferrer"&gt;HTML Standard: The DOCTYPE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Quirks_mode_and_standards_mode" rel="noopener noreferrer"&gt;MDN: Understanding quirks and standards modes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.php.net/manual/en/xsltprocessor.transformtoxml.php" rel="noopener noreferrer"&gt;PHP manual: XSLTProcessor::transformToXml&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.php.net/manual/en/xsl.installation.php" rel="noopener noreferrer"&gt;PHP manual: XSL extension, Installation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.php.net/manual/en/features.commandline.options.php" rel="noopener noreferrer"&gt;PHP manual: Command line options&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lxml.de/xpathxslt.html" rel="noopener noreferrer"&gt;lxml: XSLT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nodejs.org/api/" rel="noopener noreferrer"&gt;Node.js documentation: API index&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.npmjs.com/package/saxon-js" rel="noopener noreferrer"&gt;npm: saxon-js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.npmjs.com/package/xslt-processor" rel="noopener noreferrer"&gt;npm: xslt-processor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap" rel="noopener noreferrer"&gt;Google Search Central: Build and Submit a Sitemap&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types" rel="noopener noreferrer"&gt;MDN: Common media types&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;This post was first published on &lt;a href="https://xmlnest.com/blog/xslt-server-side-php-node-python/" rel="noopener noreferrer"&gt;xmlnest.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>xml</category>
      <category>php</category>
      <category>python</category>
      <category>node</category>
    </item>
    <item>
      <title>Does Chrome's XSLT removal hurt your WordPress sitemap's SEO?</title>
      <dc:creator>Ayoub Kharbouch</dc:creator>
      <pubDate>Fri, 06 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/ayoub_kharbouch_6d1ecff6c/does-chromes-xslt-removal-hurt-your-wordpress-sitemaps-seo-1j7c</link>
      <guid>https://dev.to/ayoub_kharbouch_6d1ecff6c/does-chromes-xslt-removal-hurt-your-wordpress-sitemaps-seo-1j7c</guid>
      <description>&lt;p&gt;No. Google reads the XML of your sitemap; the WordPress sitemap XSL only lays it out as a table for people who open the file in a browser. On 17 November 2026, Chrome stops drawing that table, and the Sitemaps report in Search Console tells you whether Google still reads the file.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does Google read in a WordPress sitemap?
&lt;/h2&gt;

&lt;p&gt;The XML itself: the &lt;code&gt;loc&lt;/code&gt; address of each page and, if it is accurate, its &lt;code&gt;lastmod&lt;/code&gt; date. Google's sitemap documentation says that it ignores &lt;code&gt;priority&lt;/code&gt; and &lt;code&gt;changefreq&lt;/code&gt;, and that it uses &lt;code&gt;lastmod&lt;/code&gt; only when the date is consistently and verifiably accurate. None of this depends on a stylesheet. Your server sends the same file whether Chrome applies the stylesheet or not.&lt;/p&gt;

&lt;p&gt;Chrome stops applying XSL stylesheets from version 158, on 17 November 2026. &lt;a href="https://xmlnest.com/guides/xslt-removed-from-chrome/" rel="noopener noreferrer"&gt;The full XSLT removal schedule&lt;/a&gt; covers the two exceptions, the origin trial and the enterprise policy, which both end in August 2027.&lt;/p&gt;

&lt;p&gt;Our guide to &lt;a href="https://xmlnest.com/guides/view-wordpress-sitemap/" rel="noopener noreferrer"&gt;finding a WordPress sitemap&lt;/a&gt; shows where WordPress, Yoast SEO and Rank Math publish theirs, and how to read a sitemap index.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does the XSL file in a WordPress sitemap do?
&lt;/h2&gt;

&lt;p&gt;It turns the XML into a page that people can read, with a title, a short explanation and a table of links. WordPress core has shipped these stylesheets since version 5.5, according to its announcement. The file asks for its stylesheet in a processing instruction near the top. These are the first three lines of the sitemap index of a WordPress 7.1.3 test site, with the test address replaced by &lt;code&gt;example.com&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;?xml-stylesheet type="text/xsl" href="https://example.com/wp-sitemap-index.xsl" ?&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;sitemapindex&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;"http://www.sitemaps.org/schemas/sitemap/0.9"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The sitemaps listed in the index point to &lt;code&gt;/wp-sitemap.xsl&lt;/code&gt; in the same way. WordPress builds these addresses from the site's home URL, as its code reference shows. Yoast SEO, whose index is at &lt;code&gt;/sitemap_index.xml&lt;/code&gt;, also links its sitemaps to an XSL file, according to its developer specification. For any other plugin, look at the source of the sitemap: a line that starts with &lt;code&gt;&amp;lt;?xml-stylesheet&lt;/code&gt; and contains &lt;code&gt;type="text/xsl"&lt;/code&gt; means that the file uses XSL.&lt;/p&gt;

&lt;p&gt;In every case, the stylesheet is a separate file, and the list of addresses stays in the XML.&lt;/p&gt;

&lt;h2&gt;
  
  
  What will my sitemap look like in Chrome without XSLT?
&lt;/h2&gt;

&lt;p&gt;Raw XML under a warning, if the sitemap links to an XSL stylesheet. We tested this in Chromium 156 with its XSLT feature turned off, as it will be for most users in Chrome 158. A sitemap linked to an XSL stylesheet showed this line at the top of the page:&lt;/p&gt;

&lt;p&gt;"This document cannot be formatted as intended. It uses XSLT, which the browser does not support. You might be able to install a browser extension that allows you to view it."&lt;/p&gt;

&lt;p&gt;The words "install a browser extension" link to a Chrome Web Store search for XSLT Polyfill: this is the warning banner that Chrome's announcement describes. Below it came the source of the file: the processing instruction, then every &lt;code&gt;url&lt;/code&gt;, &lt;code&gt;loc&lt;/code&gt; and &lt;code&gt;lastmod&lt;/code&gt; element as plain text. The file itself was intact; only the table was gone.&lt;/p&gt;

&lt;p&gt;A sitemap with no stylesheet at all gets Chrome's tree view instead, under the line "This XML file does not appear to have any style information associated with it. The document tree is shown below." It is not an error, and it will look the same after 17 November. Our guide to opening XML files explains &lt;a href="https://xmlnest.com/guides/open-xml-file-in-chrome/" rel="noopener noreferrer"&gt;what that message means&lt;/a&gt;. A broken file, for example one with an unclosed tag, shows a third message: "This page contains the following errors", with the line and column where Chrome stopped reading.&lt;/p&gt;

&lt;p&gt;None of these messages tells you how Google sees the file.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I check that my sitemap is valid and read by Google?
&lt;/h2&gt;

&lt;p&gt;Use the Sitemaps report in Search Console. It shows what Google actually fetched, whatever any browser displays.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Search Console for your site. According to Google's help, you need owner permissions on the property to submit a sitemap.&lt;/li&gt;
&lt;li&gt;Open the Sitemaps report.&lt;/li&gt;
&lt;li&gt;In the "Add a new sitemap" box, enter the URL of your sitemap index, for example &lt;code&gt;https://example.com/wp-sitemap.xml&lt;/code&gt;, or &lt;code&gt;https://example.com/sitemap_index.xml&lt;/code&gt; with Yoast SEO or Rank Math. Then click "Submit".&lt;/li&gt;
&lt;li&gt;Read the Status column.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The help page defines three statuses. "Success" means that the sitemap was loaded and processed with no errors. "Has errors" means that Google fetched it but found one or more errors; the URLs it could parse are still queued for crawling. "Couldn't fetch" means that Google could not retrieve the file.&lt;/p&gt;

&lt;p&gt;For each file, the report also shows its type (sitemap or sitemap index), the date Google last read it and the number of discovered pages. Compare that number with the number of addresses you expect your sitemap to list.&lt;/p&gt;

&lt;p&gt;A file that opens in Chrome can still break the rules. MDN explains that a correct XML document must be well-formed and must also follow the rules set in its schema or DTD; Chrome only checks the first part. For sitemaps, those rules come from the sitemaps protocol, which requires UTF-8 encoding and limits a single sitemap to 50,000 URLs or 50MB uncompressed. Google's documentation repeats these limits.&lt;/p&gt;

&lt;p&gt;Search Console does the work of an XML validator for these rules. Its list of errors includes "Parsing error", when Google could not parse the XML, often because of an unescaped character in a URL, and "Incorrect namespace", when the namespace of the root element is missing, wrong or misspelled. These errors affect how Google reads your sitemap; a missing XSL layout does not.&lt;/p&gt;

&lt;p&gt;Before you submit, you can also paste the file into our free &lt;a href="https://xmlnest.com/tools/sitemap-checker/" rel="noopener noreferrer"&gt;Sitemap Checker&lt;/a&gt;. It runs in your browser and lists problems such as bad URLs, invalid dates and duplicates, each with its line.&lt;/p&gt;

&lt;p&gt;To read the sitemap yourself in Chrome after 17 November, install &lt;a href="https://chromewebstore.google.com/detail/xslt-polyfill/hlahhpnhgficldhfioiafojgdhcppklm" rel="noopener noreferrer"&gt;XSLT Polyfill&lt;/a&gt;, the extension that Chrome's announcement links to. Its Store page says that it applies an XSLT polyfill to all XML documents, so your sitemap gets its table back. XMLNest (on the Chrome Web Store) also shows it as &lt;a href="https://xmlnest.com/extension/" rel="noopener noreferrer"&gt;a sitemap table you can filter&lt;/a&gt;, sort and export to CSV or JSON. Its Issues tab checks the live sitemap with the same rules as the Sitemap Checker, and on a sitemap index it loads every child sitemap from the same site in one click. Neither extension changes your site: from 17 November, visitors who have neither installed will see the raw XML.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.chrome.com/docs/web-platform/deprecating-xslt" rel="noopener noreferrer"&gt;Chrome for Developers: Removing XSLT for a more secure browser&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://make.wordpress.org/core/2020/07/22/new-xml-sitemaps-functionality-in-wordpress-5-5/" rel="noopener noreferrer"&gt;Make WordPress Core: New XML Sitemaps Functionality in WordPress 5.5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.wordpress.org/reference/classes/wp_sitemaps_renderer/get_sitemap_index_stylesheet_url/" rel="noopener noreferrer"&gt;WordPress Developer Resources: WP_Sitemaps_Renderer::get_sitemap_index_stylesheet_url&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.yoast.com/features/xml-sitemaps/functional-specification/" rel="noopener noreferrer"&gt;Yoast developer portal: Yoast SEO XML Sitemaps, Functional specification&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://rankmath.com/kb/configure-sitemaps/" rel="noopener noreferrer"&gt;Rank Math: How to Configure Sitemaps in Rank Math&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.sitemaps.org/protocol.html" rel="noopener noreferrer"&gt;sitemaps.org: Protocol&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap" rel="noopener noreferrer"&gt;Google Search Central: Build and Submit a Sitemap&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://support.google.com/webmasters/answer/7451001" rel="noopener noreferrer"&gt;Sitemaps report - Search Console Help&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/XML/XML_introduction" rel="noopener noreferrer"&gt;MDN: XML introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://chromewebstore.google.com/detail/xslt-polyfill/hlahhpnhgficldhfioiafojgdhcppklm" rel="noopener noreferrer"&gt;XSLT Polyfill - Chrome Web Store&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;This post was first published on &lt;a href="https://xmlnest.com/blog/wordpress-sitemap-xslt-chrome-seo/" rel="noopener noreferrer"&gt;xmlnest.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>seo</category>
      <category>xml</category>
      <category>chrome</category>
    </item>
    <item>
      <title>Style an RSS feed with CSS: what still works in Chrome</title>
      <dc:creator>Ayoub Kharbouch</dc:creator>
      <pubDate>Tue, 03 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/ayoub_kharbouch_6d1ecff6c/style-an-rss-feed-with-css-what-still-works-in-chrome-2a84</link>
      <guid>https://dev.to/ayoub_kharbouch_6d1ecff6c/style-an-rss-feed-with-css-what-still-works-in-chrome-2a84</guid>
      <description>&lt;p&gt;A CSS stylesheet linked from a feed keeps working in Chrome after XSLT is removed, as long as the server sends the feed as application/xml or text/xml. Sent as application/rss+xml, the same feed shows as raw text and the CSS is ignored. We checked this in Chromium 156 and on a WordPress test site, and the setup takes three steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can you style an RSS feed with CSS once XSLT is gone?
&lt;/h2&gt;

&lt;p&gt;Yes, if the server sends the feed with the right content type. Chrome's XSLT announcement says that the &lt;code&gt;&amp;lt;?xml-stylesheet ... ?&amp;gt;&lt;/code&gt; processing instruction remains supported with CSS, using &lt;code&gt;type="text/css"&lt;/code&gt;. Only XSLT is removed, in Chrome 158 on 17 November 2026.&lt;/p&gt;

&lt;p&gt;That affects publishers whose feed uses an XSL stylesheet today. Chrome notes that many RSS and Atom feeds use XSLT so that people can read them when they open the feed in the browser. From 17 November, those feeds lose their layout in Chrome. A CSS stylesheet is the lighter replacement: no transformation, only rules about how each element looks.&lt;/p&gt;

&lt;p&gt;The content-type condition comes from how Chrome handles feed media types. A feed sent as &lt;code&gt;application/rss+xml&lt;/code&gt; or &lt;code&gt;application/atom+xml&lt;/code&gt; opens as plain text in Chrome, and plain text gets no stylesheet at all, neither CSS nor XSL. Our guide on &lt;a href="https://xmlnest.com/guides/rss-feed-plain-text/" rel="noopener noreferrer"&gt;RSS feeds shown as plain text&lt;/a&gt; covers that behavior and what readers can do about it.&lt;/p&gt;

&lt;p&gt;So, to style an RSS feed with CSS, you need two things: the stylesheet line in the feed, and a server that sends the feed as &lt;code&gt;application/xml&lt;/code&gt; or &lt;code&gt;text/xml&lt;/code&gt;. If your XSL-styled feed displays in Chrome today, your server already sends one of these types, and only the stylesheet line has to change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which content type lets Chrome apply CSS to a feed?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;application/xml&lt;/code&gt; or &lt;code&gt;text/xml&lt;/code&gt;. On 14 October 2026, we served a small Atom feed and a small RSS feed from a local server to Chromium 156. Each one started with this line, right after the XML declaration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?xml-stylesheet type="text/css" href="/feed.css"?&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The test stylesheet turned every &lt;code&gt;title&lt;/code&gt; element into a red 28-pixel heading and hid the other elements, so that the result could be read from the computed style of the element. We ran every case twice: with Chromium's XSLT feature on, and with it turned off, as it will be in Chrome 158. The results were the same.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feed&lt;/th&gt;
&lt;th&gt;Type sent by the server&lt;/th&gt;
&lt;th&gt;What Chromium showed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Atom&lt;/td&gt;
&lt;td&gt;&lt;code&gt;application/xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;CSS applied: the titles in red&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Atom&lt;/td&gt;
&lt;td&gt;&lt;code&gt;text/xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;CSS applied&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RSS&lt;/td&gt;
&lt;td&gt;&lt;code&gt;application/xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;CSS applied&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RSS&lt;/td&gt;
&lt;td&gt;&lt;code&gt;text/xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;CSS applied&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Atom&lt;/td&gt;
&lt;td&gt;&lt;code&gt;application/atom+xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Raw text of the feed, CSS ignored&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RSS&lt;/td&gt;
&lt;td&gt;&lt;code&gt;application/rss+xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Raw text of the feed, CSS ignored&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In the raw text cases, the page showed the source of the feed exactly as sent, in a monospace font, stylesheet line included. In the styled cases, Chrome showed no message above the content. The hidden elements, such as &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;updated&lt;/code&gt;, were gone from view but still present in the document.&lt;/p&gt;

&lt;p&gt;Without any stylesheet line, the same RSS feed sent as &lt;code&gt;application/xml&lt;/code&gt; showed Chrome's tree view under its "no style information" message, explained in &lt;a href="https://xmlnest.com/guides/open-xml-file-in-chrome/" rel="noopener noreferrer"&gt;Chrome's built-in XML tree view&lt;/a&gt;. A feed that links to an XSL stylesheet shows a different message once XSLT is off: "This document cannot be formatted as intended".&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you link a CSS stylesheet to a feed?
&lt;/h2&gt;

&lt;p&gt;Three steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Add the processing instruction.&lt;/strong&gt; The W3C recommendation "Associating Style Sheets with XML documents" defines it. It must sit in the prolog, before the root element: right after &lt;code&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;/code&gt; and before &lt;code&gt;&amp;lt;rss&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;feed&amp;gt;&lt;/code&gt;. The &lt;code&gt;href&lt;/code&gt; pseudo-attribute is required. The others are optional: &lt;code&gt;type&lt;/code&gt;, &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;media&lt;/code&gt;, &lt;code&gt;charset&lt;/code&gt; and &lt;code&gt;alternate&lt;/code&gt;. A complete RSS feed with its stylesheet line looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;?xml-stylesheet type="text/css" href="/feed.css"?&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;rss&lt;/span&gt; &lt;span class="na"&gt;version=&lt;/span&gt;&lt;span class="s"&gt;"2.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;channel&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Example blog&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&amp;gt;&lt;/span&gt;https://example.com/&lt;span class="nt"&gt;&amp;lt;/link&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;description&amp;gt;&lt;/span&gt;Latest articles&lt;span class="nt"&gt;&amp;lt;/description&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;item&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;First article&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;link&amp;gt;&lt;/span&gt;https://example.com/first/&lt;span class="nt"&gt;&amp;lt;/link&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/item&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/channel&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/rss&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Write the CSS.&lt;/strong&gt; In CSS, the initial value of &lt;code&gt;display&lt;/code&gt; is &lt;code&gt;inline&lt;/code&gt;, according to MDN. A feed has no HTML defaults, so without your own rules every element runs together on one line. Start by making the containers blocks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;rss&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;channel&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;item&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;feed&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;entry&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.4em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0.3em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;link&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;guid&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;id&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;updated&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;pubDate&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We tested this stylesheet as well: on an RSS feed, the titles were set at 1.4 times the base size and the links were hidden. In RSS, the channel and each item have their own &lt;code&gt;title&lt;/code&gt; element. To style them differently, use &lt;code&gt;channel &amp;gt; title&lt;/code&gt; and &lt;code&gt;item &amp;gt; title&lt;/code&gt;, or &lt;code&gt;feed &amp;gt; title&lt;/code&gt; and &lt;code&gt;entry &amp;gt; title&lt;/code&gt; in Atom. A plain &lt;code&gt;title&lt;/code&gt; selector also matches the titles of an Atom feed, whose elements belong to the Atom namespace: according to the W3C Selectors specification, a type selector matches elements in any namespace when the stylesheet declares no default namespace with &lt;code&gt;@namespace&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Send the right content type.&lt;/strong&gt; MDN's list of common media types recommends &lt;code&gt;application/xml&lt;/code&gt; for XML and notes that &lt;code&gt;text/xml&lt;/code&gt; is still used sometimes, so prefer &lt;code&gt;application/xml&lt;/code&gt;. The W3C Feed Validation Service will warn that this type is not specific enough for every program to identify a feed; when the type cannot be more specific, it asks for &lt;code&gt;&amp;lt;rss&lt;/code&gt; or &lt;code&gt;&amp;lt;feed&lt;/code&gt; within the first 512 bytes, which a feed that opens with the two lines above does.&lt;/p&gt;

&lt;p&gt;On WordPress, two hooks handle both changes. The &lt;code&gt;feed_content_type()&lt;/code&gt; function returns &lt;code&gt;application/rss+xml&lt;/code&gt; for RSS and &lt;code&gt;application/atom+xml&lt;/code&gt; for Atom unless a filter changes it, and the &lt;code&gt;rss_tag_pre&lt;/code&gt; action fires between the XML declaration and the root element. This code, saved as a PHP file in &lt;code&gt;wp-content/mu-plugins/&lt;/code&gt;, the folder of must-use plugins, worked on a WordPress 7.1.3 test site:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="c1"&gt;// Send RSS and Atom feeds as application/xml, so that Chrome applies a CSS stylesheet.&lt;/span&gt;
&lt;span class="nf"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'feed_content_type'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$content_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$type&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;in_array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'rss2'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'atom'&lt;/span&gt; &lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s1"&gt;'application/xml'&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$content_type&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Print the stylesheet line between the XML declaration and the root element.&lt;/span&gt;
&lt;span class="nf"&gt;add_action&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'rss_tag_pre'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;?xml-stylesheet type="text/css" href="/feed.css"?&amp;gt;'&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On nginx, for a static feed file, empty the type map for that address and set a default type, as in the example of nginx's &lt;code&gt;types&lt;/code&gt; directive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="k"&gt;location&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;/feed.xml&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kn"&gt;types&lt;/span&gt;        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="kn"&gt;default_type&lt;/span&gt; &lt;span class="nc"&gt;application/xml&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our test with nginx 1.27, this block sent &lt;code&gt;/feed.xml&lt;/code&gt; as &lt;code&gt;application/xml&lt;/code&gt;, while other &lt;code&gt;.xml&lt;/code&gt; files kept nginx's default type, &lt;code&gt;text/xml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To check what your server sends, open the feed in Chrome, open DevTools, reload the page and select the feed request in the Network panel. In the Headers tab, &lt;code&gt;content-type&lt;/code&gt; is listed under Response Headers. From a terminal, &lt;code&gt;curl -s -o /dev/null -D - https://example.com/feed/&lt;/code&gt; prints the same response headers.&lt;/p&gt;

&lt;p&gt;Podcast feeds follow the same rules: they are RSS files, so the content type decides whether Chrome applies the CSS or shows raw text.&lt;/p&gt;

&lt;p&gt;Keep the autodiscovery link of your HTML pages as it is. The RSS Advisory Board asks for &lt;code&gt;type="application/rss+xml"&lt;/code&gt; in that &lt;code&gt;link&lt;/code&gt; element. That attribute sits in your HTML page, while the &lt;code&gt;Content-Type&lt;/code&gt; header of the feed is set separately, by the server that sends the feed.&lt;/p&gt;

&lt;p&gt;If Chrome shows an error instead of your styled feed, the XML itself is broken. Our &lt;a href="https://xmlnest.com/tools/xml-validator/" rel="noopener noreferrer"&gt;XML validator&lt;/a&gt; gives the line and column of the first error.&lt;/p&gt;

&lt;h2&gt;
  
  
  What can't CSS do in an RSS feed?
&lt;/h2&gt;

&lt;p&gt;CSS changes how existing elements look. It does not change what they are. Three limits follow from that.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;link&lt;/code&gt; element of an item stays text. CSS gives it no link behavior, so readers cannot click through to the article.&lt;/p&gt;

&lt;p&gt;HTML inside a &lt;code&gt;description&lt;/code&gt; stays text too. In our test, escaped HTML and HTML in a CDATA section both showed their tags as characters, such as &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;b&amp;gt;&lt;/code&gt;. Hide the description, or keep it to plain text.&lt;/p&gt;

&lt;p&gt;CSS cannot sort items by their data or rewrite it. A date stays in the format of the feed, and items cannot be sorted by date or title.&lt;/p&gt;

&lt;p&gt;If you want a real page with clickable links, you need HTML, which means keeping an XSL stylesheet rather than CSS. For feeds that keep their XSL, Chrome's announcement suggests adding one line that loads the xslt-polyfill script; according to Chrome, this should not stop feed readers from parsing the XML. The polyfill only applies an XSL stylesheet that the feed links to, and the content type matters here too: in our test with XSLT turned off, a script placed in the feed ran when the feed was sent as &lt;code&gt;application/xml&lt;/code&gt;, and never ran as &lt;code&gt;application/rss+xml&lt;/code&gt;, because Chrome then showed the feed as plain text. The other route is to produce the HTML yourself and publish it at a separate address, so that the feed stays XML. Our &lt;a href="https://xmlnest.com/blog/xslt-server-side-php-node-python/" rel="noopener noreferrer"&gt;server-side XSLT examples&lt;/a&gt; show how.&lt;/p&gt;

&lt;p&gt;To compare your CSS version with the XSL layout it replaces, you can open the feed in &lt;a href="https://xmlnest.com/extension/" rel="noopener noreferrer"&gt;an XML viewer that applies XSL&lt;/a&gt;: XMLNest, available on the Chrome Web Store, applies XSL stylesheets (version 1.0) the way Chrome used to, and opens RSS and Atom feeds in a reader view.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.chrome.com/docs/web-platform/deprecating-xslt" rel="noopener noreferrer"&gt;Chrome for Developers: Removing XSLT for a more secure browser&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/TR/xml-stylesheet/" rel="noopener noreferrer"&gt;W3C: Associating Style Sheets with XML documents 1.0 (Second Edition)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/TR/selectors-3/#typenmsp" rel="noopener noreferrer"&gt;W3C: Selectors Level 3, Type selectors and namespaces&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/display" rel="noopener noreferrer"&gt;MDN: display&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types" rel="noopener noreferrer"&gt;MDN: Common media types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://validator.w3.org/feed/docs/warning/NonSpecificMediaType.html" rel="noopener noreferrer"&gt;W3C Feed Validation Service: Media type is not specific enough&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.wordpress.org/reference/functions/feed_content_type/" rel="noopener noreferrer"&gt;WordPress Developer Resources: feed_content_type()&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.wordpress.org/reference/hooks/rss_tag_pre/" rel="noopener noreferrer"&gt;WordPress Developer Resources: rss_tag_pre&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.wordpress.org/advanced-administration/plugins/mu-plugins/" rel="noopener noreferrer"&gt;WordPress Developer Resources: Must Use Plugins&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#types" rel="noopener noreferrer"&gt;nginx documentation: Module ngx_http_core_module, types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.chrome.com/docs/devtools/network/reference" rel="noopener noreferrer"&gt;Chrome for Developers: Network features reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.rssboard.org/rss-autodiscovery" rel="noopener noreferrer"&gt;RSS Advisory Board: RSS Autodiscovery&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/mfreed7/xslt_polyfill" rel="noopener noreferrer"&gt;XSLT Polyfill, README of mfreed7/xslt_polyfill on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;This post was first published on &lt;a href="https://xmlnest.com/blog/style-rss-feed-css-chrome/" rel="noopener noreferrer"&gt;xmlnest.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>rss</category>
      <category>css</category>
      <category>chrome</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Format XML in Notepad++, VS Code, xmllint and Python</title>
      <dc:creator>Ayoub Kharbouch</dc:creator>
      <pubDate>Sat, 31 Oct 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/ayoub_kharbouch_6d1ecff6c/format-xml-in-notepad-vs-code-xmllint-and-python-bme</link>
      <guid>https://dev.to/ayoub_kharbouch_6d1ecff6c/format-xml-in-notepad-vs-code-xmllint-and-python-bme</guid>
      <description>&lt;p&gt;Notepad++ and VS Code do not format XML on their own: each needs a free extension, and then one shortcut does the job. xmllint and Python do it from a terminal or a script. Here are the menu paths, shortcuts and commands to format XML in Notepad++, VS Code, xmllint and Python, and the two Python traps that leave a file full of blank lines or not indented at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which tool should you use to format XML?
&lt;/h2&gt;

&lt;p&gt;The one you already have open. Formatting, also called pretty-printing, adds line breaks and indentation between elements. The data does not change, and a program that reads the file sees the same document. The four tools below give the same kind of result:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Notepad++&lt;/strong&gt; with the XML Tools plugin: Ctrl+Alt+Shift+B.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VS Code&lt;/strong&gt; with the XML extension by Red Hat: Shift+Alt+F.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;xmllint&lt;/strong&gt;, on Linux, macOS or WSL: &lt;code&gt;xmllint --format file.xml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python&lt;/strong&gt;, for scripts that handle many files: &lt;code&gt;minidom&lt;/code&gt;, &lt;code&gt;ElementTree.indent()&lt;/code&gt; or lxml.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of them need well-formed XML. If a tag is not closed, they refuse to format the file and point to a line number, which is where to start looking.&lt;/p&gt;

&lt;p&gt;If you only want to read a file, you may not need to format it at all. Chrome indents XML by itself: &lt;a href="https://xmlnest.com/guides/open-xml-file-in-chrome/" rel="noopener noreferrer"&gt;open the XML file in Chrome&lt;/a&gt; and you get a tree, even when the file is one long line.&lt;/p&gt;

&lt;p&gt;No editor at hand? Our free &lt;a href="https://xmlnest.com/tools/xml-formatter/" rel="noopener noreferrer"&gt;XML formatter&lt;/a&gt; indents a file in your browser, and the &lt;a href="https://xmlnest.com/tools/xml-validator/" rel="noopener noreferrer"&gt;XML validator&lt;/a&gt; gives the line and column of the first error.&lt;/p&gt;

&lt;h2&gt;
  
  
  Format XML in Notepad++ with XML Tools
&lt;/h2&gt;

&lt;p&gt;Notepad++ has no XML formatter of its own. The free XML Tools plugin adds one.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Plugins &amp;gt; Plugins Admin&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Available&lt;/strong&gt; tab, search for "XML Tools", tick it and click &lt;strong&gt;Install&lt;/strong&gt;. Notepad++ restarts.&lt;/li&gt;
&lt;li&gt;Open your XML file, then choose &lt;strong&gt;Plugins &amp;gt; XML Tools &amp;gt; Pretty print&lt;/strong&gt;, or press &lt;strong&gt;Ctrl+Alt+Shift+B&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The same menu has variants. &lt;strong&gt;Pretty print - indent attributes&lt;/strong&gt; (Ctrl+Alt+Shift+A) also puts each attribute on its own line, which helps with long elements such as SVG paths or configuration entries. &lt;strong&gt;Pretty print - indent only&lt;/strong&gt; fixes the indentation without adding line breaks. &lt;strong&gt;Linearize&lt;/strong&gt; (Ctrl+Alt+Shift+L) does the reverse: it puts the whole document back on one line, which is handy before pasting XML into a test or a string.&lt;/p&gt;

&lt;p&gt;If the shortcut seems to do nothing, run &lt;strong&gt;Plugins &amp;gt; XML Tools &amp;gt; Check XML syntax now&lt;/strong&gt;. It reports the first error in the file. And if XML Tools is missing from Plugins Admin, its README describes the manual install: create an &lt;code&gt;XMLTools&lt;/code&gt; folder in the &lt;code&gt;plugins&lt;/code&gt; folder of Notepad++, copy &lt;code&gt;XMLTools.dll&lt;/code&gt; into it, and restart.&lt;/p&gt;

&lt;h2&gt;
  
  
  Format XML in VS Code with the XML extension
&lt;/h2&gt;

&lt;p&gt;VS Code formats JavaScript, TypeScript, JSON, HTML and CSS out of the box, but not XML. Run &lt;strong&gt;Format Document&lt;/strong&gt; on an XML file without an extension, and VS Code tells you that no formatter is installed for XML files.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the Extensions view (Ctrl+Shift+X), search for "XML" and install &lt;strong&gt;XML&lt;/strong&gt; by Red Hat. Since version 0.15, it runs without Java.&lt;/li&gt;
&lt;li&gt;Open your file and press &lt;strong&gt;Shift+Alt+F&lt;/strong&gt; on Windows, &lt;strong&gt;Shift+Option+F&lt;/strong&gt; on macOS or &lt;strong&gt;Ctrl+Shift+I&lt;/strong&gt; on Linux. &lt;strong&gt;Format Document&lt;/strong&gt; is also in the Command Palette (Ctrl+Shift+P).&lt;/li&gt;
&lt;li&gt;To format only part of the file, select it and use &lt;strong&gt;Format Selection&lt;/strong&gt; (Ctrl+K Ctrl+F).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If another installed extension also formats XML, VS Code asks which one to use. To make that choice permanent, set the indentation for XML only and format on every save, add this to your &lt;code&gt;settings.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"[xml]"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"editor.defaultFormatter"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"redhat.vscode-xml"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"editor.tabSize"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"editor.formatOnSave"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Red Hat extension takes its indentation from &lt;code&gt;editor.tabSize&lt;/code&gt; and &lt;code&gt;editor.insertSpaces&lt;/code&gt;. Its own settings start with &lt;code&gt;xml.format.&lt;/code&gt;: &lt;code&gt;xml.format.splitAttributes&lt;/code&gt; decides whether attributes go on separate lines, and &lt;code&gt;xml.format.maxLineWidth&lt;/code&gt; sets the maximum line width, 100 characters by default, or no limit with &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Format XML on the command line with xmllint
&lt;/h2&gt;

&lt;p&gt;xmllint comes with libxml2. macOS ships it. On Debian and Ubuntu it is in the &lt;code&gt;libxml2-utils&lt;/code&gt; package, and on Windows the easiest route is WSL with the same command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;libxml2-utils
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xmllint &lt;span class="nt"&gt;--format&lt;/span&gt; input.xml                          &lt;span class="c"&gt;# print the formatted XML&lt;/span&gt;
xmllint &lt;span class="nt"&gt;--format&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; pretty.xml input.xml      &lt;span class="c"&gt;# write it to a new file&lt;/span&gt;
curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://example.com/sitemap.xml | xmllint &lt;span class="nt"&gt;--format&lt;/span&gt; -   &lt;span class="c"&gt;# read from a pipe&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not run &lt;code&gt;xmllint --format file.xml &amp;gt; file.xml&lt;/code&gt;: the shell empties the file before xmllint reads it, and you lose it. Write to a new file, then rename it.&lt;/p&gt;

&lt;p&gt;The indentation is two spaces by default. The &lt;code&gt;XMLLINT_INDENT&lt;/code&gt; environment variable changes it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;XMLLINT_INDENT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"    "&lt;/span&gt; xmllint &lt;span class="nt"&gt;--format&lt;/span&gt; input.xml   &lt;span class="c"&gt;# four spaces&lt;/span&gt;
&lt;span class="nv"&gt;XMLLINT_INDENT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;$'&lt;/span&gt;&lt;span class="se"&gt;\t&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt; xmllint &lt;span class="nt"&gt;--format&lt;/span&gt; input.xml    &lt;span class="c"&gt;# tabs, in bash&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--format&lt;/code&gt; drops the whitespace already present between elements before it indents again, so a file that was badly indented by hand comes out clean. When the XML is not well-formed, xmllint prints the file name, the line and the parser error, and exits with a non-zero code. That makes it a good check in a script or a CI job. To check a file without printing it, use &lt;code&gt;xmllint --noout input.xml&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pretty-print XML in Python: minidom, ElementTree and lxml
&lt;/h2&gt;

&lt;p&gt;The quickest way in the standard library is &lt;code&gt;xml.dom.minidom&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;xml.dom&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;minidom&lt;/span&gt;

&lt;span class="n"&gt;dom&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;minidom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;input.xml&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toprettyxml&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;indent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;  &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It has two traps. On a file that already has line breaks, &lt;code&gt;toprettyxml()&lt;/code&gt; keeps the old whitespace and adds its own, so you get empty lines between elements. In our test with Python 3.14, a small indented file came out with blank lines around every child of the root. And without an &lt;code&gt;encoding&lt;/code&gt; argument, the declaration it writes has no encoding: &lt;code&gt;&amp;lt;?xml version="1.0" ?&amp;gt;&lt;/code&gt;. Pass &lt;code&gt;encoding="UTF-8"&lt;/code&gt; to get bytes with the encoding declared.&lt;/p&gt;

&lt;p&gt;Since Python 3.9, &lt;code&gt;xml.etree.ElementTree.indent()&lt;/code&gt; avoids the first trap, because it replaces the whitespace between elements instead of adding to it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;xml.etree.ElementTree&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;ET&lt;/span&gt;

&lt;span class="n"&gt;tree&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ET&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;input.xml&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ET&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;indent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tree&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;space&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;  &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;tree&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pretty.xml&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;UTF-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;xml_declaration&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With lxml (&lt;code&gt;pip install lxml&lt;/code&gt;), &lt;code&gt;pretty_print=True&lt;/code&gt; only indents elements that have no whitespace around them yet. The lxml FAQ explains why, and gives the fix: parse with &lt;code&gt;remove_blank_text=True&lt;/code&gt; first.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;lxml&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;etree&lt;/span&gt;

&lt;span class="n"&gt;parser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;etree&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;XMLParser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;remove_blank_text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;tree&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;etree&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;input.xml&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;tree&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pretty.xml&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pretty_print&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;xml_declaration&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;UTF-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without that parser option, our test file kept its one-line element as it was. lxml is also the library we used for &lt;a href="https://xmlnest.com/blog/xslt-server-side-php-node-python/" rel="noopener noreferrer"&gt;server-side XSLT in Python&lt;/a&gt;, so a script that transforms files can format the result in the same pass.&lt;/p&gt;

&lt;h2&gt;
  
  
  Read a long XML file without reformatting it
&lt;/h2&gt;

&lt;p&gt;Formatting is for editing and for clean diffs. To read a long file, a view that folds the structure is often faster than scrolling through thousands of indented lines, and it leaves the file untouched.&lt;/p&gt;

&lt;p&gt;Chrome shows local and online XML files as an indented tree with no setup. &lt;a href="https://xmlnest.com/extension/" rel="noopener noreferrer"&gt;XMLNest, an XML viewer for Chrome&lt;/a&gt;, available on the Chrome Web Store, adds folding, search in element names and values, a source view with line numbers, and the line and column of the error when a file is broken. That tells you where to look before you open the file in Notepad++ or VS Code to fix it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://npp-user-manual.org/docs/plugins/" rel="noopener noreferrer"&gt;Notepad++ User Manual: Plugins&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/morbac/xmltools" rel="noopener noreferrer"&gt;XML Tools for Notepad++, README and menu source of morbac/xmltools on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/docs/editing/codebasics" rel="noopener noreferrer"&gt;Visual Studio Code documentation: Basic editing, Formatting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=redhat.vscode-xml" rel="noopener noreferrer"&gt;Visual Studio Marketplace: XML by Red Hat&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/redhat-developer/vscode-xml/blob/main/docs/Formatting.md" rel="noopener noreferrer"&gt;vscode-xml documentation: Formatting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html" rel="noopener noreferrer"&gt;libxml2: xmllint manual page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://packages.debian.org/stable/libxml2-utils" rel="noopener noreferrer"&gt;Debian packages: libxml2-utils&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.python.org/3/library/xml.dom.minidom.html" rel="noopener noreferrer"&gt;Python documentation: xml.dom.minidom&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.python.org/3/library/xml.etree.elementtree.html" rel="noopener noreferrer"&gt;Python documentation: xml.etree.ElementTree, indent()&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lxml.de/FAQ.html" rel="noopener noreferrer"&gt;lxml FAQ: Why doesn't the pretty_print option reformat my XML output?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;This post was first published on &lt;a href="https://xmlnest.com/blog/format-xml-notepad-vscode-xmllint-python/" rel="noopener noreferrer"&gt;xmlnest.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>xml</category>
      <category>vscode</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Sitemap couldn't fetch in Search Console: what it means and how to fix it</title>
      <dc:creator>Ayoub Kharbouch</dc:creator>
      <pubDate>Sun, 25 Oct 2026 15:00:00 +0000</pubDate>
      <link>https://dev.to/ayoub_kharbouch_6d1ecff6c/sitemap-couldnt-fetch-in-search-console-what-it-means-and-how-to-fix-it-1l68</link>
      <guid>https://dev.to/ayoub_kharbouch_6d1ecff6c/sitemap-couldnt-fetch-in-search-console-what-it-means-and-how-to-fix-it-1l68</guid>
      <description>&lt;p&gt;Sitemap couldn't fetch, in the Sitemaps report of Search Console, means that Google did not download the file the last time it tried. Sometimes nothing is broken and Google simply has not read it yet; sometimes the server answers with an error, a redirect or an HTML page. A live test tells you which case you are in, in two minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does "Couldn't fetch" mean in the Sitemaps report?
&lt;/h2&gt;

&lt;p&gt;Google's help page for the Sitemaps report defines three statuses. "Success" means the file was loaded and processed with no errors. "Has errors" means Google read it but found one or more problems; the URLs it could parse still go to the crawl queue. "Couldn't fetch" means Google could not retrieve the file at all. Click the row and the details page says "Sitemap could not be read", sometimes with a more precise error such as "General HTTP error".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foleuci3hl2onaw1o0gbe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foleuci3hl2onaw1o0gbe.png" alt="Table of the Search Console sitemap statuses: Success, Has errors, Couldn't fetch and the Unknown type, with what each means and the first step to take" width="800" height="346"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Each status of the Sitemaps report, what it means and where to start. Our own diagram, built from Google's help page.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That status does not always point to a fault in your file. In episode 114 of Google's Search Off the Record podcast, John Mueller gave two common reasons for it when the XML is valid and public. The first is host load: Google had no time to fetch the file. The second is crawl demand: Google decided it did not need much more from the site, a decision he said is "very often based on the perceived quality of a website".&lt;/p&gt;

&lt;p&gt;Google's help defines no "Pending" status. It does describe the "Unknown" type, shown for a file that Google has not processed yet. If you submitted the sitemap today, run the live test below, and if it passes, wait a few days before you change anything. After a failed fetch, Google keeps trying for a few days, then stops until you resubmit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why can't Google fetch my sitemap?
&lt;/h2&gt;

&lt;p&gt;When the live test fails, the cause is almost always on the way between Google and the file.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The address is wrong.&lt;/strong&gt; A 404 means there is no sitemap at the URL you submitted. Compare it with the address your site really uses: &lt;code&gt;https&lt;/code&gt; or &lt;code&gt;http&lt;/code&gt;, with or without &lt;code&gt;www&lt;/code&gt;, with or without a trailing slash. In WordPress, Settings &amp;gt; General shows the site address. Our guide lists &lt;a href="https://xmlnest.com/guides/view-wordpress-sitemap/" rel="noopener noreferrer"&gt;where WordPress plugins publish sitemaps&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The URL redirects.&lt;/strong&gt; The help page says that for the submitted sitemap URL, redirects are not followed. Submit the final address, the one that answers directly with a 200 status.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;robots.txt blocks it.&lt;/strong&gt; Google respects robots.txt when it fetches a sitemap. A rule like &lt;code&gt;Disallow: /*.xml$&lt;/code&gt; blocks every XML file on the site, sitemaps included.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The server fails.&lt;/strong&gt; A 5xx error or a timeout shows as a fetch error. "General HTTP error" covers any other HTTP problem; expand the details in the report to see which one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A manual action is open.&lt;/strong&gt; Google does not read sitemaps while a site has an unresolved manual action. Check the Manual actions report.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WordPress hides the sitemap.&lt;/strong&gt; The WordPress 5.5 announcement says core sitemaps are turned off when Settings &amp;gt; Reading asks search engines not to index the site. The address then returns a 404.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When the server sends HTML instead of XML
&lt;/h2&gt;

&lt;p&gt;Open the sitemap in a private window and view the source. The first line should be &lt;code&gt;&amp;lt;?xml&lt;/code&gt; or the &lt;code&gt;&amp;lt;urlset&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;sitemapindex&amp;gt;&lt;/code&gt; tag. If it starts with &lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/code&gt;, Google received a web page: a login form, a maintenance page, your theme's 404 page, or a security check.&lt;/p&gt;

&lt;p&gt;Security layers are a common source. Cloudflare's "I'm Under Attack" mode shows visitors an interstitial page, and its documentation says that Bot Fight Mode cannot be skipped with WAF custom rules. Security plugins, firewalls and hosting bot filters can do the same. A cache can also serve an old copy: Rank Math advises excluding sitemaps from caching plugins.&lt;/p&gt;

&lt;p&gt;Look at the &lt;code&gt;Content-Type&lt;/code&gt; response header in the Network panel of Chrome DevTools. An XML sitemap is normally sent as &lt;code&gt;application/xml&lt;/code&gt; or &lt;code&gt;text/xml&lt;/code&gt;. If you see &lt;code&gt;text/html&lt;/code&gt;, something other than your sitemap generator answered. Forum threads call this case "Sitemap is HTML"; today's help page has no error with that name, and the closest entry is "Unsupported format".&lt;/p&gt;

&lt;p&gt;Size and compression problems have their own errors in the report. A sitemap may list 50,000 URLs and weigh 50MB uncompressed; beyond that, split it and submit a sitemap index, which can list up to 50,000 sitemaps on the same site but no other index. A &lt;code&gt;.xml.gz&lt;/code&gt; file must be valid gzip, or the report shows "Compression error".&lt;/p&gt;

&lt;h2&gt;
  
  
  WordPress: wp-sitemap.xml or sitemap_index.xml?
&lt;/h2&gt;

&lt;p&gt;WordPress has published &lt;code&gt;/wp-sitemap.xml&lt;/code&gt; since version 5.5 and lists it in the robots.txt file it generates. Yoast SEO and Rank Math replace it: their source code shows that, when their sitemap is on, they turn off the core sitemap and send &lt;code&gt;/wp-sitemap.xml&lt;/code&gt; to their own index with a 301 redirect. If you submitted the core address before installing one of them, submit &lt;code&gt;/sitemap_index.xml&lt;/code&gt; and remove the old entry from the report.&lt;/p&gt;

&lt;p&gt;Run only one sitemap generator. Two plugins that both publish sitemaps make it hard to know which file Google reads.&lt;/p&gt;

&lt;p&gt;If the plugin's sitemap itself returns a 404, go to Settings &amp;gt; Permalinks and click "Save Changes" without changing anything. Yoast and Rank Math both give this fix, which rebuilds the rewrite rules that serve the file. If the 404 remains, Yoast points to the server's rewrite rules, often on Nginx, which your host can check.&lt;/p&gt;

&lt;p&gt;From 17 November 2026, Chrome 158 stops applying XSL stylesheets, so the styled table of a WordPress sitemap disappears in the browser. Google keeps reading the same XML. Our article on &lt;a href="https://xmlnest.com/blog/wordpress-sitemap-xslt-chrome-seo/" rel="noopener noreferrer"&gt;the XSL layout and SEO&lt;/a&gt; explains why the layout does not matter to Google.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I test the sitemap URL and resubmit it?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;In Search Console, paste the sitemap URL into URL Inspection and click "Test live URL". The URL must belong to the property.&lt;/li&gt;
&lt;li&gt;Open "Page availability". "Page fetch" should say "Successful". "View tested page" shows the HTTP response headers, so you can see the status code and the content type that Google received.&lt;/li&gt;
&lt;li&gt;Check what the file contains. Paste it into the free &lt;a href="https://xmlnest.com/tools/sitemap-checker/" rel="noopener noreferrer"&gt;XML Sitemap Checker&lt;/a&gt;, which reads &lt;code&gt;.xml&lt;/code&gt; and &lt;code&gt;.xml.gz&lt;/code&gt; files in your browser and lists each problem with its line.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyinq9v1olh4ddtemnrgl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyinq9v1olh4ddtemnrgl.png" alt="Sitemap Checker results for a sample sitemap: 2 errors and 3 warnings, a relative URL and a date written as 15/10/2026" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The Sitemap Checker after "Load example": each error with its line and a Go to button.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On a live site, the &lt;a href="https://xmlnest.com/extension/" rel="noopener noreferrer"&gt;XMLNest extension for Chrome&lt;/a&gt; opens the sitemap URL itself and runs the same checks in its Issues tab. On a sitemap index, "Load all child sitemaps" reads every child sitemap from the same site, so one view covers the whole WordPress sitemap.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj7x3dnni6hkecan34nmn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj7x3dnni6hkecan34nmn.png" alt="XMLNest Issues tab on a WordPress sitemap index: 16 URLs from 3 sitemaps, 2 errors and 1 warning, each with its file and row" width="800" height="325"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;XMLNest in Chrome: the Issues tab after loading the three child sitemaps of an index.&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Fix the cause, then submit the same URL again in the Sitemaps report. Google's help asks for a new submission after a fix. "Temporary error" is the exception: Google retries by itself, and you resubmit only if it lasts several hours.&lt;/li&gt;
&lt;li&gt;If everything passes and the status stays the same, the file is not the problem. Keep the &lt;code&gt;Sitemap:&lt;/code&gt; line in robots.txt and work on the site itself; Google still finds pages through links.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Sitemap fetch checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The live test says "Successful" and the response is XML, not HTML.&lt;/li&gt;
&lt;li&gt;The submitted URL is the final https address, with no redirect.&lt;/li&gt;
&lt;li&gt;robots.txt does not block the sitemap, and no security rule challenges Googlebot.&lt;/li&gt;
&lt;li&gt;WordPress: one sitemap generator; submit &lt;code&gt;sitemap_index.xml&lt;/code&gt; with Yoast or Rank Math, &lt;code&gt;wp-sitemap.xml&lt;/code&gt; without them.&lt;/li&gt;
&lt;li&gt;Under 50,000 URLs and 50MB per file; valid gzip for &lt;code&gt;.xml.gz&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;After a fix, resubmit once, then wait a few days.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;How long can a new sitemap stay on Couldn't fetch?&lt;/strong&gt;&lt;br&gt;
Google gives no delay. Its help page defines no Pending status, and it lists the Unknown type for a sitemap that has not been processed yet. If the live test of the sitemap URL says Successful, leave it alone for a few days before you change anything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Couldn't fetch stop my pages from being indexed?&lt;/strong&gt;&lt;br&gt;
No. Google calls a sitemap a hint: it still finds pages through links. A sitemap that is never read only removes one way for Google to discover new or updated URLs, which matters most on large or new sites.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should I submit wp-sitemap.xml or sitemap_index.xml?&lt;/strong&gt;&lt;br&gt;
Submit the index that your site really serves. With Yoast SEO or Rank Math, that is sitemap_index.xml: both plugins turn off the WordPress sitemap and redirect wp-sitemap.xml to their own index. Without an SEO plugin, it is wp-sitemap.xml.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need to resubmit the sitemap after a fix?&lt;/strong&gt;&lt;br&gt;
Yes. Google's help says to fix the problem and resubmit the sitemap, because Google stops trying after a few days of failures. The only exception is Temporary error, which usually clears without a new submission.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can Cloudflare or a security plugin block Googlebot from my sitemap?&lt;/strong&gt;&lt;br&gt;
It can if a rule answers automated requests with a challenge or a block page instead of the XML. The live test in URL Inspection shows the HTTP response and the page Google received, so you can see whether that happens.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://support.google.com/webmasters/answer/7451001" rel="noopener noreferrer"&gt;Manage your sitemaps using the Sitemaps report - Search Console Help&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://support.google.com/webmasters/answer/9012289" rel="noopener noreferrer"&gt;URL Inspection tool - Search Console Help&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap" rel="noopener noreferrer"&gt;Google Search Central: Build and submit a sitemap&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/search/docs/crawling-indexing/sitemaps/large-sitemaps" rel="noopener noreferrer"&gt;Google Search Central: Manage your sitemaps with sitemap index files&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://search-off-the-record.libsyn.com/do-sitemaps-still-matter" rel="noopener noreferrer"&gt;Search Off the Record, episode 114: Do sitemaps still matter? (1 October 2026)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.sitemaps.org/protocol.html" rel="noopener noreferrer"&gt;sitemaps.org: Protocol&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://make.wordpress.org/core/2020/07/22/new-xml-sitemaps-functionality-in-wordpress-5-5/" rel="noopener noreferrer"&gt;Make WordPress Core: New XML Sitemaps Functionality in WordPress 5.5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Yoast/wordpress-seo/blob/trunk/src/initializers/disable-core-sitemaps.php" rel="noopener noreferrer"&gt;Yoast SEO source code: Disable_Core_Sitemaps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rankmath/seo-by-rank-math/blob/master/includes/modules/sitemap/class-redirect-core-sitemaps.php" rel="noopener noreferrer"&gt;Rank Math source code: Redirect_Core_Sitemaps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://yoast.com/help/my-sitemap-is-giving-a-404-error/" rel="noopener noreferrer"&gt;Yoast: My sitemap is giving a 404 error, what should I do?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://rankmath.com/kb/couldnt-fetch-error-google-search-console/" rel="noopener noreferrer"&gt;Rank Math: Troubleshooting the Couldn't Fetch Error in Google Search Console&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.cloudflare.com/fundamentals/reference/under-attack-mode/" rel="noopener noreferrer"&gt;Cloudflare docs: I'm Under Attack mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.cloudflare.com/bots/get-started/bot-fight-mode/" rel="noopener noreferrer"&gt;Cloudflare docs: Bot Fight Mode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;This post was first published on &lt;a href="https://xmlnest.com/blog/sitemap-couldnt-fetch/" rel="noopener noreferrer"&gt;xmlnest.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>wordpress</category>
      <category>xml</category>
    </item>
    <item>
      <title>Why I built XMLNest: keeping XML pages readable after Chrome drops XSLT</title>
      <dc:creator>Ayoub Kharbouch</dc:creator>
      <pubDate>Fri, 23 Oct 2026 14:15:54 +0000</pubDate>
      <link>https://dev.to/ayoub_kharbouch_6d1ecff6c/why-i-built-xmlnest-keeping-xml-pages-readable-after-chrome-drops-xslt-g38</link>
      <guid>https://dev.to/ayoub_kharbouch_6d1ecff6c/why-i-built-xmlnest-keeping-xml-pages-readable-after-chrome-drops-xslt-g38</guid>
      <description>&lt;p&gt;From 17 November 2026, open /wp-sitemap.xml in Chrome and the table of links is gone: a warning banner on top, raw XML tags underneath. The site did not change. Chrome stopped applying XSL stylesheets, and I built XMLNest so that people who are not developers can still read these pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which Chrome decision led to XMLNest?
&lt;/h2&gt;

&lt;p&gt;Chrome is removing XSLT, the language that turns an XML file into a readable page through an XSL stylesheet the file points to. From Chrome 158, on 17 November 2026, Stable releases stop applying those stylesheets. Two exceptions last until Chrome 176, on 17 August 2027: sites enrolled in Chrome's origin trial, and browsers managed with the XSLTEnabled enterprise policy.&lt;/p&gt;

&lt;p&gt;Chrome's reason is security. The libraries behind these transformations, libxslt among them, are complex C and C++ code, and that kind of code is prone to memory safety bugs such as buffer overflows. I find the decision defensible. It still lands on real pages, and on the people who open them.&lt;/p&gt;

&lt;p&gt;Those people lose the table, the headings and the clickable links. A banner at the top points to a Chrome Web Store search for "xslt polyfill". When we tested in Chromium 156 with XSLT turned off, the page then said "This document cannot be formatted as intended" and showed the tags and text of the file, with no layout at all. Our guide explains &lt;a href="https://xmlnest.com/guides/xslt-removed-from-chrome/" rel="noopener noreferrer"&gt;why XSLT is not working in Chrome&lt;/a&gt;, with the full timeline and the fixes for site owners.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which pages will look broken after 17 November?
&lt;/h2&gt;

&lt;p&gt;Chrome calls XSLT rare on the web. The pages that use it are ones people open without ever thinking about the format behind them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;WordPress sitemaps.&lt;/strong&gt; Since WordPress 5.5, a WordPress site publishes a sitemap index at &lt;code&gt;/wp-sitemap.xml&lt;/code&gt;, styled by XSL stylesheets that ship with WordPress itself. To read one before and after the change, see &lt;a href="https://xmlnest.com/guides/view-wordpress-sitemap/" rel="noopener noreferrer"&gt;viewing a WordPress sitemap in Chrome&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Yoast SEO sitemaps.&lt;/strong&gt; The index at &lt;code&gt;/sitemap_index.xml&lt;/code&gt; and the sitemaps it lists reference an XSL file for their layout.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RSS and Atom feeds.&lt;/strong&gt; Chrome notes that many feeds use XSLT so that a person who opens the feed in the browser gets something readable. If a feed already shows as code for you, the cause may be elsewhere: here is &lt;a href="https://xmlnest.com/guides/rss-feed-plain-text/" rel="noopener noreferrer"&gt;why an RSS feed shows as plain text&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Devices on a local network.&lt;/strong&gt; Chrome mentions commercial devices that generate XML for their users, and adds that many of them are difficult or impossible to update.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Plain XML files with no stylesheet are not affected. Chrome removes XSLT, not XML, so it keeps showing them the way it always has: the line "This XML file does not appear to have any style information associated with it. The document tree is shown below." above an indented tree of elements. That line is not an error. Our guide on &lt;a href="https://xmlnest.com/guides/open-xml-file-in-chrome/" rel="noopener noreferrer"&gt;opening an XML file in Chrome&lt;/a&gt; explains what it means, and what to do when you get plain text instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why does a UX designer care about raw XML?
&lt;/h2&gt;

&lt;p&gt;I have designed web products for 12 years. Most of that work comes down to one job: making information readable for people who are not developers.&lt;/p&gt;

&lt;p&gt;Raw XML fails that test. It is written for programs. A site owner checking that new pages made it into the sitemap wants a list of addresses and dates, not a wall of &lt;code&gt;&amp;lt;loc&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;lastmod&amp;gt;&lt;/code&gt; tags. Someone who clicks a podcast feed wants the episodes and a play button.&lt;/p&gt;

&lt;p&gt;Developers will cope with the change. They can read the tags, or transform the file on the server. The people I had in mind cannot, and they are the ones who open these pages in a browser rather than in a code editor.&lt;/p&gt;

&lt;p&gt;So I did not want to build a developer tool. I wanted an extension you install once and forget, until the day a sitemap or a feed looks wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does XMLNest show instead?
&lt;/h2&gt;

&lt;p&gt;XMLNest is a free XML viewer for Chrome. In practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pages that use an XSL stylesheet (XSLT 1.0) display the way Chrome used to display them. The stylesheet runs in an isolated sandbox.&lt;/li&gt;
&lt;li&gt;Any XML document opens as a tree you can fold and search, or as formatted source.&lt;/li&gt;
&lt;li&gt;RSS and Atom feeds open in a reader view, with a built-in podcast player.&lt;/li&gt;
&lt;li&gt;XML sitemaps become a table you can filter, sort and export to CSV or JSON.&lt;/li&gt;
&lt;li&gt;XML files from your computer open too, once you allow local files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It has a light and a dark theme.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvu7hpk5lclnj7vwv4fuj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvu7hpk5lclnj7vwv4fuj.jpg" alt="A podcast RSS feed in Chrome with XMLNest: the styled page with its episodes and Listen buttons is back, with the Reader, Tree and Source buttons at the bottom" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1o9w6l8nw72kob29p7ll.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1o9w6l8nw72kob29p7ll.png" alt="A WordPress sitemap index shown as a table with its own stylesheet, in Chrome with XMLNest" width="800" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It collects no data, shows no ads and asks for no account. Nothing you open is sent anywhere, and its few settings stay in your browser. It installs with no access to any site. You grant access everywhere in one click, or site by site when you need it. Scripts inside a transformed page stay off unless you allow them for that site.&lt;/p&gt;

&lt;p&gt;Those two choices come from my day job. An extension that asks to read every site at install is asking for trust before it has earned any. So XMLNest asks at the moment the access makes sense to you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why build XMLNest when an official extension exists?
&lt;/h2&gt;

&lt;p&gt;Chrome's announcement links to one extension, the official XSLT Polyfill, and people found it. According to Chrome Web Store data for &lt;a href="https://chromewebstore.google.com/detail/xslt-polyfill/hlahhpnhgficldhfioiafojgdhcppklm" rel="noopener noreferrer"&gt;its listing&lt;/a&gt;, it went from about 6,000 to about 70,000 users between 28 September and 4 October 2026.&lt;/p&gt;

&lt;p&gt;Both extensions run the same open-source engine, xslt-polyfill. They differ in three ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The official extension also brings back XSLTProcessor, the JavaScript interface that ordinary HTML pages use to run XSLT themselves. Since version 1.3, XMLNest does too, but only on the sites where you turn it on from its toolbar button, and the files a stylesheet imports must come from the page's own site.&lt;/li&gt;
&lt;li&gt;XMLNest adds the reader, tree and source views, and asks for no site access at install.&lt;/li&gt;
&lt;li&gt;XMLNest does not apply XSL stylesheets to files on your computer. Chrome never did either: in our test, a local XML file linked to a local stylesheet gave an empty page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;a href="https://xmlnest.com/extension/" rel="noopener noreferrer"&gt;XMLNest extension page&lt;/a&gt; covers how it works and each permission it asks for.&lt;/p&gt;

&lt;h2&gt;
  
  
  When can you install XMLNest?
&lt;/h2&gt;

&lt;p&gt;XMLNest is available on the Chrome Web Store now, before Chrome stops applying XSL stylesheets on 17 November 2026.&lt;/p&gt;

&lt;p&gt;You do not have to wait for that date to see what your own pages will look like. Chrome Beta, Dev and Canary have been disabling XSLT by default since Chrome 145, so opening your sitemap or your feed in one of them shows the result today.&lt;/p&gt;

&lt;p&gt;If a page does not display the way you expect, in Chrome or later in XMLNest, write to me at &lt;a href="mailto:contact@xmlnest.com"&gt;contact@xmlnest.com&lt;/a&gt; with its address.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This post was first published on &lt;a href="https://xmlnest.com/blog/why-i-built-xmlnest/" rel="noopener noreferrer"&gt;xmlnest.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>xml</category>
      <category>chrome</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
