title: KML - Replacing tag content with other tag content mutliple times on the same file
body: <p>I apologise if this question has been duplicated. I had seen some similar topics but I can't figure out how to get it working.</p>
  
  <p>I have a KML file with over 2900 placemarks, however the names that I want each placemark to have is under a different node. I simply want to replace the information from this node, into the name node. </p>
  
  <p>So to delve deeper, whilst it is possible to manually change these values, I was hoping to find an automated script that would replace the contents of  node with the contents of  (technically it could also replace with the contents of  too). It is noteworthy that the contents are all different and unique.</p>
  
  <p>Below is the following code for one placemark:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;Placemark id="Irrelevant"&gt;
  &lt;name&gt;ReplaceThis&lt;/name&gt;
  &lt;snippet&gt; &lt;/snippet&gt;
  &lt;description&gt;&lt;![CDATA[&lt;center&gt;&lt;table&gt;&lt;tr&gt;&lt;th colspan='2' align='center'&gt;&lt;em&gt;Attributes&lt;/em&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr bgcolor="#E3E3F3"&gt;
  &lt;th&gt;DMAID&lt;/th&gt;
  &lt;td&gt;ReplaceWithThis&lt;/td&gt;
  &lt;/tr&gt;&lt;tr bgcolor=""&gt;
  &lt;th&gt;DMADESCRIPTION&lt;/th&gt;
  &lt;td&gt;Irrelevant&lt;/td&gt;
  &lt;/tr&gt;&lt;/table&gt;&lt;/center&gt;]]&gt;&lt;/description&gt;
  &lt;ExtendedData&gt;
  &lt;SchemaData schemaUrl="#kml_schema_ft_cwDMA_20170301_WebMercator"&gt;
  &lt;SimpleData name="DMAID"&gt;ReplaceWithThis&lt;/SimpleData&gt;
  &lt;SimpleData name="DMADESCRIPTION"&gt;Irrelevant&lt;/SimpleData&gt; 
  &lt;/SchemaData&gt;
  &lt;/ExtendedData&gt;
  &lt;Polygon&gt;
  &lt;outerBoundaryIs&gt;
  &lt;LinearRing&gt;
  &lt;coordinates&gt;
  &lt;/coordinates&gt;
  &lt;/LinearRing&gt;
  &lt;/outerBoundaryIs&gt;
  &lt;/Polygon&gt;
  &lt;/Placemark&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I don't have any software in particular for a script to run, is there any that anyone can suggest? I read something about Oxygen but that requires a license fee? </p>
  
  <p>The file is 56mb so I'm not too concerned with regards to performance speed, but just anything to amend the output would be greatly appreciated. Thank you for reading, any help would be greatly appreciated. Unfortunately I am a novice with handling KML files.</p>
  
  <p>In my mind's image the flow would be around:</p>
  
  <ul>
  <li>For Each [placemark]</li>
  <li>Replace all things enveloped by [name][/name]</li>
  <li>with [name] [Simple Data DMAID Contents] [/name]</li>
  </ul>