Forums  

Go Back   Forums > Talk > General FPP Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 09-23-2010, 10:06 AM
Pim Pim is offline
Junior Member
 
Join Date: Feb 2010
Posts: 3
Downloads: 0
Uploads: 0
Default Invalid (but working) xml token?

I know absolutely nothing about xml. So probably this is a stupid question
Every xml-validator tells me that & is an invalid token (f.ex: onClick="loadPano(F2.swf?pan=-119&xml_file=F2.xml)"/>). But loads of FPP users use it. And it works in FPP.
But the XML is not valid...
Any ideas?
Reply With Quote
  #2  
Old 09-23-2010, 11:12 AM
allSaints's Avatar
allSaints allSaints is offline
Senior Member
 
Join Date: Aug 2008
Location: Stockholm, Sweden
Posts: 945
Downloads: 0
Uploads: 0
Default

Hi Pim,

actually, that is a very good question.

The "&" is a forbidden character in XML because it has a special function. It is used to encode other characters that you can't use - like for example a "<".

The "<" is of course used to start a new tag in XML, so if you want to use a "<" somewhere as data, you have to encode it as "&lt;" (or place it inside a <![CDATA[ ... ]]> block).

The reason that it works in the FPP file, depends on the code that is used to parse the xml. And for a while, we had problems with the new beta Flash Player - extensively debated in a thread somewhere in this forum. I would recommend to always encode your ampersands as "&amp;".

Tommy
Reply With Quote
  #3  
Old 09-23-2010, 12:14 PM
Pim Pim is offline
Junior Member
 
Join Date: Feb 2010
Posts: 3
Downloads: 0
Uploads: 0
Default

Thank you very much, Tommy, that did the trick! My XmlPad likes &amp; a lot better:-)
And it still is working in FPP.

I hope you don?t mind but there?s another one that is bothering me:

<spot id="hvor" url="pno_F3.swf" linked="F3" static="1" staticX="-420" staticY="-220" "depth="2"/>

I just can?t figure out why this one is invalid...
IE is pointing at the space between "hvor" and url.

Thanks again for helping
Pim
Reply With Quote
  #4  
Old 09-23-2010, 12:30 PM
allSaints's Avatar
allSaints allSaints is offline
Senior Member
 
Join Date: Aug 2008
Location: Stockholm, Sweden
Posts: 945
Downloads: 0
Uploads: 0
Default

Pim,

there seems to be a quotation mark to much before "depth=".

For some reason it always seems much easier to spot the errors of others than your own...

Tommy
Reply With Quote
  #5  
Old 09-23-2010, 12:39 PM
Pim Pim is offline
Junior Member
 
Join Date: Feb 2010
Posts: 3
Downloads: 0
Uploads: 0
Default

You are the hero, that saved my day:-)

Thanks man!
Best regards
Pim
Reply With Quote
Reply

Thread Tools
Display Modes

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. The time now is 11:42 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.