Note that there are some explanatory texts on larger screens.

plurals
  1. POReplace pairs of lines in XML document using Sed (or something BASH-like) and convert to CSV
    text
    copied!<p>I have a pdf document which I've converted to an XML document (to make it a bit easier to work with), and I need to strip out most of the data and change pairs of lines into csv format. Here's what I have in my XML:</p> <pre><code>&lt;text top="231" left="75" width="154" height="11" font="2"&gt;JGD0002250185412827&lt;/text&gt; &lt;text top="231" left="288" width="122" height="11" font="2"&gt;CODE99876&lt;/text&gt; &lt;text top="231" left="482" width="8" height="11" font="2"&gt;1&lt;/text&gt; &lt;text top="231" left="555" width="57" height="11" font="2"&gt;IP65 5LK&lt;/text&gt; &lt;text top="231" left="696" width="89" height="11" font="2"&gt;Malcolm Montgomery&lt;/text&gt; &lt;text top="252" left="75" width="154" height="11" font="2"&gt;JGD0012564109019827&lt;/text&gt; &lt;text top="252" left="288" width="122" height="11" font="2"&gt;CODE4674&lt;/text&gt; &lt;text top="252" left="482" width="8" height="11" font="2"&gt;1&lt;/text&gt; &lt;text top="252" left="551" width="65" height="11" font="2"&gt;CV98 3LN&lt;/text&gt; &lt;text top="252" left="680" width="121" height="11" font="2"&gt;WILLIAM SHATNER&lt;/text&gt; </code></pre> <p>I need to get something like the following from that:</p> <pre><code>"CODE99876","JGD0002250185412827","IP65 5LK" "CODE4674","JGD0012564109019827","CV98 3LN" </code></pre> <p>I'm assuming it's possible, but so far no luck (disaster in fact, my outputs have just looks like an angry child's gone to town on a bucket of alphabetti-spaghetti). </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