Page 1 of 1

How do I....

Posted: 24 Dec 2019 11:37
by tea
Hi guys

I need to edit a .xml file to remove all instances of the word East. How would I do that?

Thank you

Merry Christmas
Happy holidays!
Here is a snipit of part of the file.

guide.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<tv date="22/12/2019 9:28:18 PM" source-info-url="http://schedulesdirect.org" source-info-name="Schedules Direct" generator-info-name="EPG123" generator-info-url="http://epg123.garyan2.net">
  <channel id="00411">
    <display-name>Information</display-name>
  </channel>
  <channel id="10021">
    <display-name>AMC East</display-name>
    <icon height="270" src="https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s10021_h3_aa.png" width="360" />
  </channel>
  <channel id="10057">
    <display-name>Bravo East</display-name>
    <icon height="270" width="360" src="https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s10057_h3_aa.png" />
  </channel>
  <channel id="10093">
    <display-name>FREEFORM</display-name>
    <icon width="360" src="https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s10093_h3_aa.png" height="270" />
  </channel>
  <channel id="10120">
    <display-name>Cinemax East</display-name>
    <icon src="https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s10120_h3_aa.png" width="360" height="270" />
  </channel>
  <channel id="10121">
    <display-name>MoreMax</display-name>
    <icon src="https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s10121_h3_aa.png" width="360" height="270" />
  </channel>
  <channel id="10139">
    <display-name>CNBC US</display-name>
    <icon src="https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s10139_h3_aa.png" width="360" height="270" />
  </channel>
  <channel id="101419">
    <display-name>Real Extreme</display-name>
    <icon width="360" src="https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s101419_h3_aa.png" height="270" />
  </channel>
  <channel id="10149">
    <display-name>Comedy Central East</display-name>
    <icon height="270" width="360" src="https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s10149_h3_aa.png" />
  </channel>
  <channel id="10153">
    <display-name>Tru TV East</display-name>
    <icon width="360" src="https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s10153_h3_aa.png" height="270" />

Re: How do I....

Posted: 24 Dec 2019 12:56
by aGerman
JREPL maybe?
viewtopic.php?f=3&t=6044

Code: Select all

cmd /c jrepl.bat " East\b" "" /f "guide.xml|utf-8" /o -
Note that the original file will be overwritten.

Steffen

Re: How do I....

Posted: 24 Dec 2019 19:38
by penpen
Another option were to use xslt to change the xml data; example:
viewtopic.php?p=32941#p32941

penpen

Re: How do I....

Posted: 24 Dec 2019 21:53
by tea
Thanks guys !

I will play around with each.