SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV EPG Service
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV EPG Service Discussion related to the SageTV EPG Service used within SageTV. Questions about service area coverage, channel lineups, EPG listings, XMLTV, or anything else related to the service or programming guide data for SageTV should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-01-2005, 06:45 AM
owilsky's Avatar
owilsky owilsky is offline
Sage Aficionado
 
Join Date: Dec 2004
Location: Germany
Posts: 447
Importing XMLTV, how do I get line breaks?

Hi,

I am currently writing a tool to convert the Clickfinder database to the xml format.

(Clickfinder is a german tool which provides EPG information using an Access-Database: http://www.tvmovie.de/clickfinder/clickfinder.html )

Everything works fine so far, but I have two problems:

1.

I want to insert line breaks into the description. So I tried to add Ascii-Codes #13 + #10 at the end of the line in the XML code and it seems to work.
But I do not get empty lines when using #13+#10+#13+#10.
Sage seems to simply ignore multiple line breaks and takes only the first one.
Any ideas?

2.

Same problem with the webserver plugin. Here I do not get any line breaks at all. Is there any character it recognizes and converts to "<br>" ?

Thanks for your help,

Oliver

PS: When the tool works as I expect it to I will post it in the German part of the forum because I think this is only interesting for Sage users in Germany...
__________________
Oliver Kötter
------------
Check this thread for importing German TV Data into SageTV

Using SageTV 7.1.9, Java 1.6.0_24 Win7 Home Premium on an
Asus M4N78-AM Mainboard, AMD Athlon II X2 215, 4 GB RAM, 500 GB HDD, 2xTechnoTrend S-2400 as Network Encoder (LM DVB Smart Recorder), ATI Radeon HD 3450 with analog TV-Out on good old CRT TV (100Hz)
My avatar shows the world's best composer!!!
Reply With Quote
  #2  
Old 02-01-2005, 06:58 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Oddly, there is no formal support for line breaks in XMLTV, so anything is a bit of a hack...

The XML parser used by the importer strips multiple whitespace (as required by the XML spec) so multiple line breaks become a single line break (you could try something messy such as \r\n.\r\n)

The webserver plugin does not recognise anything as a line break and does not translate it to <br/> (I have put it on the todo list!)
Reply With Quote
  #3  
Old 02-01-2005, 07:16 AM
owilsky's Avatar
owilsky owilsky is offline
Sage Aficionado
 
Join Date: Dec 2004
Location: Germany
Posts: 447
Thanks for your reply.

Quote:
Originally Posted by nielm
Oddly, there is no formal support for line breaks in XMLTV, so anything is a bit of a hack...

The XML parser used by the importer strips multiple whitespace (as required by the XML spec) so multiple line breaks become a single line break (you could try something messy such as \r\n.\r\n)
What do you mean by "XML parser used by the importer"? Do you mean the XML importer Plugin? No problem then, I will have a look at the source and fix it for me.

Quote:
The webserver plugin does not recognise anything as a line break and does not translate it to <br/> (I have put it on the todo list!)
Thanks for that. Do you have any idea when a new version will be released?

Oliver
__________________
Oliver Kötter
------------
Check this thread for importing German TV Data into SageTV

Using SageTV 7.1.9, Java 1.6.0_24 Win7 Home Premium on an
Asus M4N78-AM Mainboard, AMD Athlon II X2 215, 4 GB RAM, 500 GB HDD, 2xTechnoTrend S-2400 as Network Encoder (LM DVB Smart Recorder), ATI Radeon HD 3450 with analog TV-Out on good old CRT TV (100Hz)
My avatar shows the world's best composer!!!
Reply With Quote
  #4  
Old 02-01-2005, 07:41 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quote:
Originally Posted by owilsky
What do you mean by "XML parser used by the importer"? Do you mean the XML importer Plugin? No problem then, I will have a look at the source and fix it for me.
no, I mean the Java XML parser (xerces) that the XMLTV importer plugin uses -- from memory, it strips off multiple whitespace before giving it to the importer -- this is actually part of the XML spec, so that
Code:
<tag>
   text
</tag>
is equivalent to
Code:
<tag>text</tag>
Re webserver new release: when its ready
Reply With Quote
  #5  
Old 02-01-2005, 09:03 AM
owilsky's Avatar
owilsky owilsky is offline
Sage Aficionado
 
Join Date: Dec 2004
Location: Germany
Posts: 447
Quote:
Originally Posted by nielm
Code:
<tag>
   text
</tag>
is equivalent to
Code:
<tag>text</tag>
Yes, that is OK, but there must be a way to have cr/lf in the text... maybe if you have the text in quotes?

Code:
<tag>"This is the Text.
There was a line break.

There was an empty line (two line breaks)."
</tag>
This would comply with the xml-standard I guess...
The parser may not change/ strip anything within the quotes....
Does anybody know if this works? I will try it this evening at home....

Oliver
__________________
Oliver Kötter
------------
Check this thread for importing German TV Data into SageTV

Using SageTV 7.1.9, Java 1.6.0_24 Win7 Home Premium on an
Asus M4N78-AM Mainboard, AMD Athlon II X2 215, 4 GB RAM, 500 GB HDD, 2xTechnoTrend S-2400 as Network Encoder (LM DVB Smart Recorder), ATI Radeon HD 3450 with analog TV-Out on good old CRT TV (100Hz)
My avatar shows the world's best composer!!!
Reply With Quote
  #6  
Old 02-01-2005, 09:29 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quotes wont work like this (they don't have special meaning in XML) neither will backslashes or anything like that...

The XML construct for passing preformatted data 'as-is' without any special interpretation is the CDATA structure:
Code:
<tag><![CDATA[
This is the Text.
There was a line break.

There was an empty line (two line breaks).]]>
</tag>
where everthing between the <![CDATA[ and the ]]> are passed as-is without interpretation... But this is outside of the XMLTV spec and you will have to update the EPG importer java plugin for it to be able to understand this...

(useful link: http://www.xml.com/pub/a/w3j/s3.walsh.html)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 11:59 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.