<?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[select products with a certain category (tag)]]></title><description><![CDATA[<p dir="auto">I have an xml file with many products selected by category and subcategory, how can I view only the subcategory I prefer? example subcategory "salumeria"<img src="/assets/uploads/files/1655289807831-cattura.jpg" alt="Cattura.JPG" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/topic/23117/select-products-with-a-certain-category-tag</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 15:34:37 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/23117.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Jun 2022 10:43:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to select products with a certain category (tag) on Wed, 15 Jun 2022 15:17:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/massimo-la-terra" aria-label="Profile: massimo-la-terra">@<bdi>massimo-la-terra</bdi></a> said in <a href="/post/77560">select products with a certain category (tag)</a>:</p>
<blockquote>
<p dir="auto">thanks for the answer, sorry for my translated English, in practice with a click I would like to display only the products of the Subcategory&gt; SALUMERIA &lt;/Subcategory&gt;</p>
</blockquote>
<p dir="auto">Notepad++ is an editor, not an XML Presentation filter, so it will never give you exactly that.  Its job is to make it easy to edit the raw text as a whole, not easy to just see filter the sub-categories you want</p>
<p dir="auto">My first set of instructions <em>will</em> allow you to hide everything, and then you just do the search (as described above) to find the next occurrence of that; after you’ve cycled through enough “Find Next”, you will have shown all the product groups with the subcategory SALUMERIA.  Problem solved.</p>
<p dir="auto">For example,</p>
<ol>
<li>start with</li>
</ol>
<pre><code>&lt;Product&gt;
	&lt;irrelvant&gt;...&lt;/irrelvant&gt;
	&lt;Subcategory&gt;SALUMERIA&lt;/Subcategory&gt;
	&lt;irrelvant&gt;...&lt;/irrelvant&gt;
&lt;/Product&gt;
&lt;Product&gt;
	&lt;irrelvant&gt;...&lt;/irrelvant&gt;
	&lt;Subcategory&gt;OTHER&lt;/Subcategory&gt;
	&lt;irrelvant&gt;...&lt;/irrelvant&gt;
&lt;/Product&gt;
&lt;Product&gt;
	&lt;irrelvant&gt;...&lt;/irrelvant&gt;
	&lt;Subcategory&gt;SALUMERIA&lt;/Subcategory&gt;
	&lt;irrelvant&gt;...&lt;/irrelvant&gt;
&lt;/Product&gt;
&lt;Product&gt;
	&lt;irrelvant&gt;...&lt;/irrelvant&gt;
	&lt;Subcategory&gt;OTHER&lt;/Subcategory&gt;
	&lt;irrelvant&gt;...&lt;/irrelvant&gt;
&lt;/Product&gt;
</code></pre>
<p dir="auto">So there are two products in the SALUMERIA subcategory, and two that aren’t.<br />
2. Hit Alt+0 to hide everything<br />
<img src="/assets/uploads/files/1655305939866-5e748307-197b-4df7-9b0c-02556eafd883-image.png" alt="5e748307-197b-4df7-9b0c-02556eafd883-image.png" class=" img-fluid img-markdown" /><br />
3. FIND = <code>&lt;Subcategory&gt;SALUMERIA&lt;/Subcategory&gt;</code><br />
<img src="/assets/uploads/files/1655305983650-86d57c15-5f0a-42bc-b00b-2cc2dc9e50a1-image.png" alt="86d57c15-5f0a-42bc-b00b-2cc2dc9e50a1-image.png" class=" img-fluid img-markdown" /><br />
4. FIND NEXT will show the second one as well:<br />
<img src="/assets/uploads/files/1655306003663-31a7eb58-9bbd-403a-89b5-8be4b4b45ed4-image.png" alt="31a7eb58-9bbd-403a-89b5-8be4b4b45ed4-image.png" class=" img-fluid img-markdown" /><br />
5. Repeat FIND NEXT until they have all been revealed.</p>
<p dir="auto">It’s not a single click, but it doesn’t take all that long.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77562</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77562</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 15 Jun 2022 15:17:43 GMT</pubDate></item><item><title><![CDATA[Reply to select products with a certain category (tag) on Wed, 15 Jun 2022 14:59:24 GMT]]></title><description><![CDATA[<p dir="auto">thanks for the answer, sorry for my translated English, in practice with a click I would like to display only the products of the Subcategory&gt; SALUMERIA &lt;/Subcategory&gt;<img src="/assets/uploads/files/1655305148759-immagine-2022-06-15-165046.png" alt="Immagine 2022-06-15 165046.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/77560</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77560</guid><dc:creator><![CDATA[massimo la terra]]></dc:creator><pubDate>Wed, 15 Jun 2022 14:59:24 GMT</pubDate></item><item><title><![CDATA[Reply to select products with a certain category (tag) on Wed, 15 Jun 2022 13:06:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/massimo-la-terra" aria-label="Profile: massimo-la-terra">@<bdi>massimo-la-terra</bdi></a> ,</p>
<p dir="auto">It depends on what you want.  In one instance, you say “view”, in another, you say “select”, and those are two different things.</p>
<p dir="auto">For “view”, take for instance the following simplified data:</p>
<pre><code>&lt;parent&gt;
&lt;Product&gt;
    &lt;id&gt;11111&lt;/id&gt;
    &lt;code&gt;22222&lt;/code&gt;
    &lt;Subcategory&gt;CORPO&lt;/Subcategory&gt;
&lt;/Product&gt;
&lt;Product&gt;
    &lt;id&gt;333&lt;/id&gt;
    &lt;code&gt;4444&lt;/code&gt;
    &lt;Subcategory&gt;SALUMERIA&lt;/Subcategory&gt;
&lt;/Product&gt;
&lt;/parent&gt;
</code></pre>
<p dir="auto">If I do <strong>View &gt; Fold All (<code>Alt+0</code>)</strong>, it will collapse it down to only showing the parent: <img src="/assets/uploads/files/1655297789615-fd5738fc-fbf1-4d5d-b07a-da722d8ff367-image.png" alt="fd5738fc-fbf1-4d5d-b07a-da722d8ff367-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">At this point, if I search for <code>SALUMERIA</code>, it will just uncollapse the segment necessary to show the line containing <code>SALUMERIA</code>:<br />
<img src="/assets/uploads/files/1655297830144-8e4e463a-9c76-49ad-bc1b-ca4e76a91f3f-image.png" alt="8e4e463a-9c76-49ad-bc1b-ca4e76a91f3f-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">(sorry, my screenshots above were taken when I had all lowercase for the tags; I uppercased them after I realized it would affect the regex below)</p>
<p dir="auto">-----</p>
<p dir="auto">On the other hand, if you want to <em>select</em> the whole <code>&lt;Product&gt;...&lt;/Product&gt;</code> which contains <code>&lt;Subcategory&gt;SALUMERIA&lt;/Subcategory&gt;</code>, then a search similar to <strong>Find what</strong> = <code>(?s)&lt;Product&gt;(?:(?!&lt;/Product&gt;).)*?&lt;Subcategory&gt;SALUMERIA&lt;/Subcategory&gt;(?:(?!&lt;/Product&gt;).)*?&lt;/Product&gt;\R?</code> with <strong>Search Mode</strong> = <code>Regular Expression</code> should be used.</p>
<p dir="auto"><img src="/assets/uploads/files/1655298349243-18cb03ab-8c8d-4a80-8ad3-d9bd9cce0096-image.png" alt="18cb03ab-8c8d-4a80-8ad3-d9bd9cce0096-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/77557</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77557</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 15 Jun 2022 13:06:35 GMT</pubDate></item></channel></rss>