<?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[Custom XML syntax Highlighting? Custom XML UDL?]]></title><description><![CDATA[<p dir="auto">I’m working with a video game that uses XML sheets as it’s primary scripting and definition source.  Here’s what i’d like to be able to do: Basically add keyword highlighting to the XML syntax highlighting. I’d like a XML syntax (or UDL) that behaves exactly like the default built in XML syntax highlighting, but has the ability to override and highlight certain keywords in tags and/or tag attributes. This would make it easier for me to script events, etc. for the game as the tags are read as action commends, etc.</p>
<p dir="auto">So is there a way to Edit the Default XML highlighting to include keyword highlighting? Or is there a way to make a UDL that acts like the XML highlighting (highlighting tags, collapsing tags, etc.) but also gives me the other range of options a UDL does?</p>
<p dir="auto">Example (Default):<br />
<img src="https://camo.nodebb.org/03876abc25538d32abefa1ecbda8f336aff3ed1b?url=https%3A%2F%2Fi.imgur.com%2F9KdWxoS.png" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">Example (Desired):<br />
<img src="https://camo.nodebb.org/ec6d1218a7152f544d2a298a280377fcba3769d4?url=https%3A%2F%2Fi.imgur.com%2Fdt4Zsj9.png" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">Thanks in advance for any help!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22828/custom-xml-syntax-highlighting-custom-xml-udl</link><generator>RSS for Node</generator><lastBuildDate>Sun, 10 May 2026 23:59:48 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22828.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 09 Apr 2022 23:10:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Custom XML syntax Highlighting? Custom XML UDL? on Mon, 11 Apr 2022 15:54:45 GMT]]></title><description><![CDATA[<p dir="auto">To borrow an idiom from GitHub: 🚀</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75944</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75944</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 11 Apr 2022 15:54:45 GMT</pubDate></item><item><title><![CDATA[Reply to Custom XML syntax Highlighting? Custom XML UDL? on Mon, 11 Apr 2022 15:53:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a><br />
Thank you - the repo is already updated and the next version will include it.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75943</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75943</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Mon, 11 Apr 2022 15:53:57 GMT</pubDate></item><item><title><![CDATA[Reply to Custom XML syntax Highlighting? Custom XML UDL? on Mon, 11 Apr 2022 15:44:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: ekopalypse">@<bdi>ekopalypse</bdi></a></p>
<p dir="auto">Thanks.  I don’t know why I didn’t try 0x when # didn’t work.</p>
<p dir="auto">But yes, having that in the documentation is a definite improvement.</p>
<p dir="auto">The other thing I would suggest in the comments would be to phrase it:</p>
<pre><code>; A colour is a number in the range 0 - 16777215.
; The notation is either pure digits or a hex notation starting with 0x or #, 
; such as 0xff00ff or #ff00ff.
; Please note: 
; * red goes in the lowest byte (0x0000FF)
; * green goes in the center byte (0x00FF00)
; * blue goes in the biggest byte (0xFF0000) 
; * this BGR order might conflict with your expectation of RGB order.
; * see Microsoft COLORREF documentation https://docs.microsoft.com/en-us/windows/win32/gdi/colorref
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/75942</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75942</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 11 Apr 2022 15:44:19 GMT</pubDate></item><item><title><![CDATA[Reply to Custom XML syntax Highlighting? Custom XML UDL? on Mon, 11 Apr 2022 15:22:53 GMT]]></title><description><![CDATA[<p dir="auto">A new version v.0.2.0 was created which added the #color notation and made it “interactive”.<br />
Unfortunately, the “#” is a comment character that makes the rest of the line look like it is inactive, which of course it is not.</p>
<p dir="auto"><img src="/assets/uploads/files/1649690393907-319c0493-ff27-40a1-814a-f378d0bc532f-image.png" alt="319c0493-ff27-40a1-814a-f378d0bc532f-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/75941</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75941</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Mon, 11 Apr 2022 15:22:53 GMT</pubDate></item><item><title><![CDATA[Reply to Custom XML syntax Highlighting? Custom XML UDL? on Mon, 11 Apr 2022 09:08:20 GMT]]></title><description><![CDATA[<p dir="auto">Sorry I’m late to the party, and thank you for the interest in this plugin. Hex notation of a colour is also supported, I’ll make sure to update the sample configuration to make this clear.<br />
As for the #bbccff notation, I think this should be easy to do, as for me this means I replace # with 0x and the code remains the same.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/logicsequence" aria-label="Profile: LogicSequence">@<bdi>LogicSequence</bdi></a> - can I ask you how I can improve the documentation in the config file to make it easier to understand for starters?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75930</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75930</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Mon, 11 Apr 2022 09:08:20 GMT</pubDate></item><item><title><![CDATA[Reply to Custom XML syntax Highlighting? Custom XML UDL? on Sun, 10 Apr 2022 11:01:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/logicsequence" aria-label="Profile: logicsequence">@<bdi>logicsequence</bdi></a> said in <a href="/post/75914">Custom XML syntax Highlighting? Custom XML UDL?</a>:</p>
<blockquote>
<p dir="auto">you need to invert the red and blue value before putting into a converter to get the color to display properly (i think this is probably a bug?</p>
</blockquote>
<p dir="auto">No bug, really.  It originates with how Windows decided to handle colors, i.e., in the COLORREF definition, see <a href="https://docs.microsoft.com/en-us/windows/win32/gdi/colorref" rel="nofollow ugc">HERE</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75915</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75915</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 10 Apr 2022 11:01:16 GMT</pubDate></item><item><title><![CDATA[Reply to Custom XML syntax Highlighting? Custom XML UDL? on Sun, 10 Apr 2022 06:07:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a> Just noticed, btw, that when converting from HEX color values to decimal values you need to invert the red and blue value before putting into a converter to get the color to display properly (i think this is probably a bug?).</p>
<p dir="auto">So if you want, say, darkish purple, it would be a HEX value of #80 00 ff, but if you convert that value to DEC it won’t show properly.  You have to input #ff 00 80 to get it to work.  Just FYI for anyone wondering why colors aren’t working as they might have expected.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75914</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75914</guid><dc:creator><![CDATA[LogicSequence]]></dc:creator><pubDate>Sun, 10 Apr 2022 06:07:24 GMT</pubDate></item><item><title><![CDATA[Reply to Custom XML syntax Highlighting? Custom XML UDL? on Sun, 10 Apr 2022 00:14:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a> You’re amazing and i love you, that’s exactly what i needed to know.  The hex to decimal thing threw me off too, but i can just google a converter. Looks like this will do exactly what i want. I am in all your debts.  Thank you <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> for the recommendation as well!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75911</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75911</guid><dc:creator><![CDATA[LogicSequence]]></dc:creator><pubDate>Sun, 10 Apr 2022 00:14:15 GMT</pubDate></item><item><title><![CDATA[Reply to Custom XML syntax Highlighting? Custom XML UDL? on Sun, 10 Apr 2022 00:03:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/logicsequence" aria-label="Profile: logicsequence">@<bdi>logicsequence</bdi></a> ,</p>
<p dir="auto">I had only previously used Eko’s pythonscript-based version.  But since you asked so nice (well, actually, because I was curious as to how the interface would be), I downloaded it, and within about 10 minutes was able to get it to:</p>
<p dir="auto"><img src="/assets/uploads/files/1649548451894-61a68293-b775-497a-9383-cdfba9f7951f-image.png" alt="61a68293-b775-497a-9383-cdfba9f7951f-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">At the end of your EnhanceAnyLexerConfig.ini, add:</p>
<pre><code>[xml]
16711935 = \b(KeywordLists|WordsStyle)\b
</code></pre>
<p dir="auto">Amazingly, the plugin sees that the file has changed, and applies the changes instantly.</p>
<p dir="auto">In case you were curious as to my figuring-out procedure, I took the example python from that file:</p>
<pre><code>;[python]
;1077960 = \b(cls|self)\b
;excluded_styles = 1,3,4,6,7,12,16,17,18,19
</code></pre>
<p dir="auto">Uncommented (removed the <code>;</code>) and changed the header to <code>[xml]</code> instead of <code>[python]</code>.  I then created some dummy tags in my example file that were <code>&lt;cls&gt;</code> and <code>&lt;self&gt;</code>, and saw they were a mustardy color.  So that implies it was actually doing something.  Then I added <code>KeywordLists</code> to the regex, so it said ` \b(cls|self|KeywordLists)\b, and now that tag is also mustard.  Eureka!</p>
<p dir="auto">To change the color, I know that colors are usually 0xRRGGBB or 0xBBGGRR (and I knew that Notepad++ used the latter) – it would be nice if <a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: Ekopalypse">@<bdi>Ekopalypse</bdi></a> would add a note about the color values in the example ini.  So I saw your color was 0xFF00FF. (which then doesn’t matter which is red and which is blue).  I converted that to decimal, which is <code>16711935</code>, and replaced that.  It changed to purply text!  WooHoo!</p>
<p dir="auto">I then added <code>WordsStyle</code> after a new <code>|</code> and got rid of the <code>cls|self|</code>, yielding the config file section I showed originally.</p>
<p dir="auto">The excluded styles will help you avoid coloring those same terms in unwanted lexer situations, but that’s not critical from the get-go.</p>
<p dir="auto">So, that’s working.  Expanding to more keywords is up to you.   For a beta plugin, that was easy enough.</p>
<p dir="auto">( <a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: Ekopalypse">@<bdi>Ekopalypse</bdi></a> , my other suggestion would be to allow #BBGGRR as the color value as well.  But great conversion from the original pythonscript, BTW.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75910</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75910</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sun, 10 Apr 2022 00:03:22 GMT</pubDate></item><item><title><![CDATA[Reply to Custom XML syntax Highlighting? Custom XML UDL? on Sat, 09 Apr 2022 23:42:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> I’ve got the plugin installed, but i don’t know what it’s asking me to do whatsoever.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75909</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75909</guid><dc:creator><![CDATA[LogicSequence]]></dc:creator><pubDate>Sat, 09 Apr 2022 23:42:14 GMT</pubDate></item><item><title><![CDATA[Reply to Custom XML syntax Highlighting? Custom XML UDL? on Sat, 09 Apr 2022 23:34:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> BUUUUT… how the hell do i use this? I don’t want to waste your time, but if you could give me like a 10 sec how-to that would be great.  If you can’t, no problems, though.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75908</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75908</guid><dc:creator><![CDATA[LogicSequence]]></dc:creator><pubDate>Sat, 09 Apr 2022 23:34:21 GMT</pubDate></item><item><title><![CDATA[Reply to Custom XML syntax Highlighting? Custom XML UDL? on Sat, 09 Apr 2022 23:31:35 GMT]]></title><description><![CDATA[<p dir="auto"><s><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> I can’t seem to get that to install, i followed the directions on the page but N++ doesn’t recognize it as an installed plugin.</s></p>
<p dir="auto">Nevermind stupid mistake on my part.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75907</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75907</guid><dc:creator><![CDATA[LogicSequence]]></dc:creator><pubDate>Sat, 09 Apr 2022 23:31:35 GMT</pubDate></item><item><title><![CDATA[Reply to Custom XML syntax Highlighting? Custom XML UDL? on Sat, 09 Apr 2022 23:12:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/logicsequence" aria-label="Profile: logicsequence">@<bdi>logicsequence</bdi></a> said in <a href="/post/75905">Custom XML syntax Highlighting? Custom XML UDL?</a>:</p>
<blockquote>
<p dir="auto">is there a way to Edit the Default XML highlighting to include keyword highlighting?</p>
</blockquote>
<p dir="auto">Nope.</p>
<p dir="auto">Suggest you look into “EnhanceAnyLexer” plugin.  It lets a default lexer do its job and then adds to it.  See <a href="https://github.com/Ekopalypse/EnhanceAnyLexer" rel="nofollow ugc">HERE</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/75906</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/75906</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 09 Apr 2022 23:12:48 GMT</pubDate></item></channel></rss>