I create an xmltv.xml for TV listings and need to use SED for some post processing. Im using Windows 10 with SED for Windows run via a bat file. The trouble is only certain tags are shown on my front end so i need to combine sub-title with desc in the xml. I have a current SED command i run to append the sub-title to the title, but can't figure out sub-title to desc.
This is what a channel in the xml looks like, but not all programmes have a sub-title.
<programme start="20160422223500 -0500" stop="20160422233700 -0500" channel="Channel_ID"> <title lang="en">Program Name</title> <sub-title lang="en">Subtitle Example</sub-title> <desc lang="en">Description Example</desc>
This is how i would append a hockey team from the sub-title to the title using sed.txt
sed.exe -f sed.txt < "xmltv.xml" > "xmltv2.xml"
:a;N;$!ba;s/\(<programme[^<]*\)\(<t[^>]*>\)\(NHL Hockey*[^<]*\)\(<[^<]*\)\(<sub-title[^>]*>\)\([^<]*\)[^<\/programme]*/\1\2\3: \6\4\5\6/g
Can someone please provide a command like above to append the sub-title to desc like this?
<desc lang="en">Subtitle Example : Description Example</desc>