<html><head></head><body><div dir="auto">Xmlstarlet<br><br></div>
<div dir="auto"><a href="http://xmlstar.sourceforge.net">http://xmlstar.sourceforge.net</a><br><br></div>
<div dir="auto">Kevin<br><br><br><br></div>
<div dir="auto"><!-- tmjah_g_1299s -->Sent from <!-- tmjah_g_1299e --><a href="http://www.bluemail.me/r?b=13569"><!-- tmjah_g_1299s -->BlueMail<!-- tmjah_g_1299e --></a><!-- tmjah_g_1299s --> <!-- tmjah_g_1299e --></div>
<div class="gmail_quote" >On Sep 12, 2018, at 12:48 AM, "der.hans" <<a href="mailto:plugd@lufthans.com" target="_blank">plugd@lufthans.com</a>> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="blue">moin moin,<br><br>Actually, sgrep with sed for XML :).<br><br>I have a chunk of XML I would like to transform. Any suggestions on how to<br>do the following from the command line?<br><br>----<br>     <table:table-row><br>      <table:table-cell table:style-name="Table1.A1"<br>office:value-type="string"><br>       <text:p text:style-name="Standard">blah content stuff</text:p><br>      </table:table-cell><br>      <table:table-cell table:number-columns-spanned="2"<br>office:value-type="string"><br>       <text:p text:style-name="Standard"/><br>      </table:table-cell><br>      <table:covered-table-cell/><br>     </table:table-row><br>----<br><br>I would like to make the first cell span 3 columns and wipe out the second<br>cell.<br><br>The graphical tool essentially turns it into the following.<br><br>----<br>     <table:table-row><br>      <table:table-cell table:style-name="Table1.A2"<br>table:number-columns-spanned="3" office:value-type="string"><br>       <text:p text:style-name="Standard">blah content stuff</text:p><br>      </table:table-cell><br>      <table:covered-table-cell/><br>     </table:table-row><br>----<br><br>A new style, Table1.A2, is introduced. That cell is spanned across three<br>columnts. The table:table-cell object for the second cell is removed.<br><br>I can do this with sed, but that invites XML issues. Also, there are some<br>more complex changes I want to make.<br><br>ciao,<br><br>der.hans</pre></blockquote></div></body></html>