Note that there are some explanatory texts on larger screens.

plurals
  1. POText Processing with Program Instead of Perl
    text
    copied!<p>I have a .plist file that looks like this:</p> <pre><code>&lt;plist version="1.0"&gt; &lt;array&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Alabama&lt;/string&gt; &lt;key&gt;abreviation&lt;/key&gt; &lt;string&gt;AL&lt;/string&gt; &lt;key&gt;date&lt;/key&gt; &lt;string&gt;1819&lt;/string&gt; &lt;key&gt;population&lt;/key&gt; &lt;string&gt;4,627,851&lt;/string&gt; &lt;key&gt;capital&lt;/key&gt; &lt;string&gt;Montgomery&lt;/string&gt; &lt;key&gt;largestCity&lt;/key&gt; &lt;string&gt;Birmingham&lt;/string&gt; &lt;/dict&gt; .... &lt;/array&gt; &lt;/plist&gt; </code></pre> <p>I want to add more information to the plist such as motto and nickname. They are in this format:</p> <pre><code>&lt;nickname&gt;Yellowhammer State&lt;/nickname&gt; &lt;nickname&gt;The Last Frontier&lt;/nickname&gt; &lt;nickname&gt;The Grand Canyon State&lt;/nickname&gt; &lt;nickname&gt;The Natural State&lt;/nickname&gt; &lt;nickname&gt;The Golden State&lt;/nickname&gt; &lt;nickname&gt;The Centennial State&lt;/nickname&gt; &lt;nickname&gt;The Constitution State&lt;/nickname&gt; &lt;nickname&gt;The First State&lt;/nickname&gt; &lt;nickname&gt;The Sunshine State&lt;/nickname&gt; </code></pre> <p>I am considering doing some search and replace to add more information. I could also write a perl script to read the nicknames and add them into the plist.</p> <p>But, is there a text processing program that would allow me to iterate over the values and insert them in the correct spot? I have been searching through text processors/editors and cannot find what I am looking for.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload