<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to prevent auto syntax highlighting for files with xml tag in first line?]]></title><description><![CDATA[<p dir="auto">I often need to edit a file that has 20,000 tags. Notepad++ hangs for 10 seconds on opening that file because it reads from the first line:</p>
<p dir="auto"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</code></p>
<p dir="auto">then automatically applies XML syntax highlighting, and this process is super heavy and slow for that file.<br />
I need to empasize: Notepad++ is detecting XML because of the first line. It’s not due to file extension. File extension is XSPF and this doesn’t matter. I can rename it to <code>.js</code> and Notepadd++ still applies XML syntax. In the same way, if I keep <code>.xspf</code> and just remove the first line, then Notepad++ opens the file without any formatting (and all slowness goes away!).</p>
<p dir="auto">So my question is how to prevent this. I need to open this file as “Normal text”, without any formatting.</p>
<p dir="auto">This is not caused by XML Tools, this happens even without any plugin.</p>
<p dir="auto">Also I don’t know why Notepad++ is so inefficient with XML files. SciTE opens the same file instantly, with syntax highlighting and fold marks.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22658/how-to-prevent-auto-syntax-highlighting-for-files-with-xml-tag-in-first-line</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 14:00:22 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22658.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 02 Mar 2022 08:16:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to prevent auto syntax highlighting for files with xml tag in first line? on Wed, 02 Mar 2022 10:34:09 GMT]]></title><description><![CDATA[<p dir="auto">Answered <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11319#issuecomment-1056768023" rel="nofollow ugc">on GitHub</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74761</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74761</guid><dc:creator><![CDATA[rdipardo]]></dc:creator><pubDate>Wed, 02 Mar 2022 10:34:09 GMT</pubDate></item><item><title><![CDATA[Reply to How to prevent auto syntax highlighting for files with xml tag in first line? on Wed, 02 Mar 2022 08:57:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pintassilgo" aria-label="Profile: pintassilgo">@<bdi>pintassilgo</bdi></a> ,</p>
<p dir="auto">Maybe you should. I never saw that behavior when I was trying to read just text, but then again, I didn’t rename the ext .xml. :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74758</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74758</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Wed, 02 Mar 2022 08:57:30 GMT</pubDate></item><item><title><![CDATA[Reply to How to prevent auto syntax highlighting for files with xml tag in first line? on Wed, 02 Mar 2022 08:32:27 GMT]]></title><description><![CDATA[<p dir="auto">I just realized that the first line</p>
<p dir="auto"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</code></p>
<p dir="auto">is what’s causing the bug.</p>
<p dir="auto">If I remove that line, but rename the file to <code>.xml</code> so that Notepad++ will sill open it with XML syntax highlight, the file opens instantly.</p>
<p dir="auto">So it’s not that Notepad++ is unable to properly handle XML files. It’s just that the first line is triggering some strange bug.</p>
<p dir="auto">Should I report this?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74757</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74757</guid><dc:creator><![CDATA[pintassilgo]]></dc:creator><pubDate>Wed, 02 Mar 2022 08:32:27 GMT</pubDate></item></channel></rss>