There are code that we generate somehow having the whole data
merged into just ONE long line.
And end-user complained can’t be processed.
Which is not so easy to read.

unless you did some magic before viewing as follows :
xmllint --format IDM26004.xml |more
which did reformatting it.. into a human readable tab/indent.

However, later I found out the fix for generating script is quite easy.
Just need to add the following item.
my $writer = new XML::Writer (
OUTPUT => \$xml, DATA_MODE => 1,DATA_INDENT => 2
);
which is decribed here :
DATA_MODE
A true or false value; if this parameter is present and its value is true, then the module will enter a special data mode, inserting newlines automatically around elements and (unless UNSAFE is also specified) reporting an error if any element has both characters and elements as content.
DATA_INDENT
A numeric value or white space; if this parameter is present, it represents the indent step for elements in data mode (it will be ignored when not in data mode). If it is white space it will be repeated for each level of indentation.
so the full look like follows..
# =====================================================================
# gen_xml ()
# ---------------------------------------------------------------------
sub gen_xml {
my ($next_time) = @_;
my @nowtime = localtime (time());
syslog ("info", "Generating Tide XML");
my $xml;
my $writer = new XML::Writer (
OUTPUT => \$xml, DATA_MODE => 1,DATA_INDENT => 2
);
$writer->xmlDecl();
$writer->startTag ("tides");
$writer->emptyTag ("timezone",
'name' => 'MST', value=>'8.0'
);
..
so result would as :
[namran@nb-namran tmp]$ head IDM26004.xml
Saturday 22/01/11
References :

Let’s see how long that WEBSITE WITH XMLTV FILES for MALAYSIA’s ASTRO THAT CAN BE USED ON MYTHTV lasts … 😎
http://www.google.com/search?q=malaysia+astro+mythtv&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
keh keh keh keh …
you can also use tv_cat to concatenate multiple xmltv files into one, and pass it to mythfilldatabase in one go.
Got a few other useful tv_* utilities, e.g. tv_to_text.
Having good content can only get you so far unless you also provide a good atmosphere to comment in
I write a music blog for my audience research class. I’m new to blogging and I want them to be good! So any advice you guys could give me would be great
oh.. haven’t done exploring all the utilities
that come with the myth app..
hehe..
google still working even while i was away.. 😎
complex post. upright one detail where I contest with it. I am emailing you in detail.
Guys…. if you look at the Astro website (http://www.astro.com.my) they now publish their complete tv listings (albeit channel by channel) in XML / RSS format. For example TV1 is at http://www.astro.com.my/channels/rtm1/ with the RSS feed being at http://www.astro.com.my/rss/channels.asp?sid=M038. Although I am not as technical as many on this forum, surely this must make life easier?
Chaggy
Great idea chaggy!
I wrote a script to convert the RSS feed(s) on astro’s website into XMLTV for mythtv:
http://dev.abubakar.net/astro2xmltv/
If anyone tries it, let me know how it works. Instructions are at the top of the script.
Astro stopped their RSS feeds some months ago. I wrote yet-another script based on the EPG as of January 2011.
http://home.abubakar.net/pubdocs/ under astro_xmltv.