<?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[Convert to lowercase in xml text]]></title><description><![CDATA[<p dir="auto">Hi! I need to change cyrillic letters to lowercase without XML text (example: <em>&lt;Heart.label&gt;&lt;/Heart.label&gt;</em> )</p>
<p dir="auto">Example:<br />
BEFONE:<br />
&lt;Heart.label&gt;<strong>С</strong>ърце&lt;/Heart.label&gt;<br />
&lt;LeftLung.label&gt;<strong>Л</strong>яв бял дроб&lt;/LeftLung.label&gt;<br />
&lt;RightLung.label&gt;<strong>Д</strong>есен бял дроб&lt;/RightLung.label&gt;<br />
&lt;LeftKidney.label&gt;<strong>Л</strong>яв бъбрек&lt;/LeftKidney.label&gt;<br />
&lt;RightKidney.label&gt;<strong>Д</strong>есен бъбрек&lt;/RightKidney.label&gt;<br />
&lt;Liver.label&gt;<strong>Ч</strong>ерен дроб&lt;/Liver.label&gt;<br />
&lt;Stomach.label&gt;<strong>С</strong>томах&lt;/Stomach.label&gt;</p>
<p dir="auto">AFTER:<br />
&lt;Heart.label&gt;<strong>с</strong>ърце&lt;/Heart.label&gt;<br />
&lt;LeftLung.label&gt;<strong>л</strong>яв бял дроб&lt;/LeftLung.label&gt;<br />
&lt;RightLung.label&gt;<strong>д</strong>есен бял дроб&lt;/RightLung.label&gt;<br />
&lt;LeftKidney.label&gt;<strong>л</strong>яв бъбрек&lt;/LeftKidney.label&gt;<br />
&lt;RightKidney.label&gt;<strong>д</strong>есен бъбрек&lt;/RightKidney.label&gt;<br />
&lt;Liver.label&gt;<strong>ч</strong>ерен дроб&lt;/Liver.label&gt;<br />
&lt;Stomach.label&gt;<strong>с</strong>томах&lt;/Stomach.label&gt;</p>
<p dir="auto">Is it possible to do this in a quick way?<br />
Sorry for bad English!<br />
Thanks in advance!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/14869/convert-to-lowercase-in-xml-text</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 06:51:40 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/14869.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 04 Dec 2017 17:39:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Convert to lowercase in xml text on Wed, 06 Dec 2017 15:50:14 GMT]]></title><description><![CDATA[<p dir="auto">Wow man! You made me very happy indeed :) Thanks so much</p>
]]></description><link>https://community.notepad-plus-plus.org/post/28479</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/28479</guid><dc:creator><![CDATA[Stefan Krumov]]></dc:creator><pubDate>Wed, 06 Dec 2017 15:50:14 GMT</pubDate></item><item><title><![CDATA[Reply to Convert to lowercase in xml text on Tue, 05 Dec 2017 21:57:16 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/10568">@stefan-krumov</a>,</p>
<p dir="auto"><strong>Logically</strong>, the right and straight way to do it would be to use a <strong>S/R</strong>, with <strong>regular</strong> expressions, as below, which changes any part, between the <strong>tags</strong> <strong><code>&lt;xxx.label&gt;</code></strong> and <strong><code>&lt;/xxx.label&gt;</code></strong> by the <strong>same lower-cased</strong> part !</p>
<p dir="auto">SEARCH <strong><code>(?-i)&lt;(.+\.label)&gt;(.+?)&lt;/\1&gt;</code></strong><br />
REPLACE <strong><code>&lt;\1&gt;\L\2\E&lt;/\1&gt;</code></strong></p>
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">The <strong><code>(?-i)</code></strong> forces the search to be performed, in a <strong>non</strong>-insensitive way</p>
</li>
<li>
<p dir="auto">Then, the part <strong><code>&lt;(.+\.label)&gt;</code></strong> stores the tag <strong>name</strong> as <strong>group 1</strong>, which is re-used to match the <strong>ending</strong> tag <strong><code>&lt;/\1&gt;</code></strong></p>
</li>
<li>
<p dir="auto">And the <strong><code>(.+?)</code></strong> middle part is the <strong>smaller</strong> range of characters, between these <strong>two</strong> tags, that is to say the <strong>Cyrillic</strong> text, stored as <strong>group 2</strong></p>
</li>
<li>
<p dir="auto">In <strong>replacement</strong>, we rewrite, first, the <strong>starting</strong> tag <strong><code>&lt;\1&gt;</code></strong>, then the <strong>Cyrillic</strong> text <strong><code>\2</code></strong>, preceded by the <strong>global lower-case</strong> modifier <strong><code>\L</code></strong> and followed by the <strong>ending case</strong> modifier <strong><code>\E</code></strong> and, finally, the <strong>ending</strong> tag <strong><code>&lt;/\1&gt;</code></strong></p>
</li>
</ul>
<hr />
<p dir="auto"><strong>Unfortunately</strong>, due to a bug, in the <strong>BOOST</strong> Regex Engine, used internally by N++, the different <strong>case modifiers</strong> ( <strong><code>\L</code></strong>, <strong><code>\U</code></strong>, <strong><code>\l</code></strong> and  <strong><code>\u</code></strong> ), used in the <strong>Replacement</strong> part, do <strong>NOT</strong> change the <strong>case</strong> of characters, with <strong>Unicode</strong> value greater than <strong><code>\x{007F}</code></strong>. Too bad, indeed :-((</p>
<p dir="auto">On the contrary, with the above <strong>S/R</strong>, for instance, the line :</p>
<pre><code class="language-diff">&lt;Heart.label&gt;Young Man Heart&lt;/Heart.label&gt;
</code></pre>
<p dir="auto">would, <strong>correctly</strong>, be changed into :</p>
<pre><code class="language-diff">&lt;Heart.label&gt;young man heart&lt;/Heart.label&gt;
</code></pre>
<p dir="auto">So, <strong>Stefan</strong>, we <strong>cannot</strong> use this method to <strong>lower case</strong> your <strong>Cyrillic</strong> characters ! However, just note that the <strong>Edit &gt; Convert Case to &gt; lowercase</strong> command (<strong><code>Crtl + U</code></strong> ) works as expected and does change any letter, of any <strong>alphabet</strong>, to its <strong>lower-cased</strong> counter-part :-))</p>
<hr />
<p dir="auto">Therefore, <strong>Stefan</strong>, here is a <strong>work-around</strong>, to get what you want, easily enough ! The general idea is :</p>
<ul>
<li>
<p dir="auto">First, to <strong>surround</strong> any <strong>Cyrillic</strong> text, between the <strong>two</strong> tags  <strong><code>&lt;xxx.label&gt;</code></strong> and <strong><code>&lt;/xxx.label&gt;</code></strong>, with some <strong>tabulation</strong> characters</p>
</li>
<li>
<p dir="auto">Secondly, to get a <strong>rectangular</strong> selection ( <strong>Column</strong> mode ) of all your <strong>Cyrillic</strong> text</p>
</li>
<li>
<p dir="auto">Thirdly, to use the <strong>Edit &gt; Convert Case to &gt; lowercase</strong> command ( or the <strong><code>Ctrl + U</code></strong> shortcut )</p>
</li>
<li>
<p dir="auto">Finally, to <strong>delete</strong> all the temporary <strong>tabulation</strong> characters</p>
</li>
</ul>
<p dir="auto">So, from your <strong>initial</strong> example, below :</p>
<pre><code class="language-diff">&lt;Heart.label&gt;Сърце&lt;/Heart.label&gt;
&lt;LeftLung.label&gt;Ляв бял дроб&lt;/LeftLung.label&gt;
&lt;RightLung.label&gt;Десен бял дроб&lt;/RightLung.label&gt;
&lt;LeftKidney.label&gt;Ляв бъбрек&lt;/LeftKidney.label&gt;
&lt;RightKidney.label&gt;Десен бъбрек&lt;/RightKidney.label&gt;
&lt;Liver.label&gt;Черен дроб&lt;/Liver.label&gt;
&lt;Stomach.label&gt;Стомах&lt;/Stomach.label&gt;
</code></pre>
<ul>
<li>Open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</li>
</ul>
<p dir="auto">SEARCH <strong><code>(?-i)&lt;(.+\.label)&gt;\K.+?(?=&lt;/\1&gt;)</code></strong></p>
<p dir="auto">REPLACE <strong><code>\t\t\t\t$0\t\t\t\t</code></strong></p>
<p dir="auto">OPTIONS <strong><code>Wrap around</code></strong> and <strong><code>Regular expression</code></strong></p>
<p dir="auto">And ,after a click on the <strong>Replace All</strong> button ( do <strong>NOT</strong> use the <strong>Replace</strong> button ! ), you get :</p>
<pre><code class="language-diff">&lt;Heart.label&gt;				Сърце				&lt;/Heart.label&gt;
&lt;LeftLung.label&gt;				Ляв  бял дроб				&lt;/LeftLung.label&gt;
&lt;RightLung.label&gt;				Десен бял дроб				&lt;/RightLung.label&gt;
&lt;LeftKidney.label&gt;				Ляв бъбрек				&lt;/LeftKidney.label&gt;
&lt;RightKidney.label&gt;				Десен бъбрек				&lt;/RightKidney.label&gt;
&lt;Liver.label&gt;				Черен дроб				&lt;/Liver.label&gt;
&lt;Stomach.label&gt;				Стомах				&lt;/Stomach.label&gt;
</code></pre>
<p dir="auto"><strong>Remarks</strong> :</p>
<ul>
<li>
<p dir="auto">You may, immediately, <strong>RE-run</strong> this S/R, to better <strong>isolate</strong> your <strong>Cyrillic</strong> text</p>
</li>
<li>
<p dir="auto">You may change, in the <strong>Replacement</strong> part, the number of <strong><code>\t</code></strong> forms, surrounding the <strong><code>$0</code></strong> syntax ( the <strong>entire matched</strong> expression )</p>
</li>
</ul>
<p dir="auto">Now, create a <strong>rectangular</strong> selection of <strong>all</strong> the <strong>Cyrillic</strong> characters and execute a <strong><code>Ctrl + U</code></strong> action, to get this text <strong>lower-cased</strong> :</p>
<pre><code class="language-diff">&lt;Heart.label&gt;				сърце				&lt;/Heart.label&gt;
&lt;LeftLung.label&gt;				ляв бял дроб				&lt;/LeftLung.label&gt;
&lt;RightLung.label&gt;				десен бял дроб				&lt;/RightLung.label&gt;
&lt;LeftKidney.label&gt;				ляв бъбрек				&lt;/LeftKidney.label&gt;
&lt;RightKidney.label&gt;				десен бъбрек				&lt;/RightKidney.label&gt;
&lt;Liver.label&gt;				черен дроб				&lt;/Liver.label&gt;
&lt;Stomach.label&gt;				стомах				&lt;/Stomach.label&gt;
</code></pre>
<p dir="auto">Finally, with the <strong>simple</strong> S/R, below, get rid of all the <strong>tabulation</strong> characters :</p>
<p dir="auto">SEARCH <strong><code>\t</code></strong></p>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
<p dir="auto">And you get the <strong>expected</strong> text :</p>
<pre><code class="language-diff">&lt;Heart.label&gt;сърце&lt;/Heart.label&gt;
&lt;LeftLung.label&gt;ляв бял дроб&lt;/LeftLung.label&gt;
&lt;RightLung.label&gt;десен бял дроб&lt;/RightLung.label&gt;
&lt;LeftKidney.label&gt;ляв бъбрек&lt;/LeftKidney.label&gt;
&lt;RightKidney.label&gt;десен бъбрек&lt;/RightKidney.label&gt;
&lt;Liver.label&gt;черен дроб&lt;/Liver.label&gt;
&lt;Stomach.label&gt;стомах&lt;/Stomach.label&gt;
</code></pre>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/28467</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/28467</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 05 Dec 2017 21:57:16 GMT</pubDate></item></channel></rss>