You are here

Adding the & symbol

14 posts / 0 new
Last post
LeeMajors
Offline
Joined: 7 years
Last seen: 7 years
Adding the & symbol

why does the webgrab config.xml file throws errors if you name a channel with the symbol & in it ? for example in the picture the & symbol will create 2 errors one because its in the id tag and the other in the display name, the only way to get it working again is to remove the symbol

 

Attachments: 
suzi
Offline
Has donated long time ago
Joined: 7 years
Last seen: 5 years

hi for the & you need to change to & so it would be ie home & health would be home & health

LeeMajors
Offline
Joined: 7 years
Last seen: 7 years

thankyou

LeeMajors
Offline
Joined: 7 years
Last seen: 7 years

thanks for that

digiboy72
Offline
Joined: 7 years
Last seen: 5 years

Why webgrab throws errors when i use ' or ' or ' in config.xml file

log.txt:

[        ]
[        ]              WebGrab+Plus/w MDB & REX Postprocess -- version  V1.57             
[        ]
[        ]                                 Jan van Straaten                                
[        ]                              Francis De Paemeleere                              
[        ]
[        ]             thanks to Paul Weterings and all the contributing users             
[        ] --------------------------------------------------------------------------------
[        ]
[        ] Job started at 21/01/2017 13:58:10
[  Debug ]
[  Debug ] Running  on: Microsoft Windows NT 6.1.7601 Service Pack 1
[  Debug ] Environment: 4.0.30319.42000
[  Debug ]
[  Debug ] Loading timezone data
[  Debug ] Embedded timezones source: WGconsole.WG.Common.timezonesdata.txt
[  Debug ] Reading config file: C:\EPG\RAPID\UK\WebGrab++.config.xml
[  Info  ] found: C:\EPG\\UK\tvguide.co.uk.ini -- Revision 14
[  Debug ] xmltv input file - C:\Bitnami\wampstack\apache2\\UK1_guide.xml - found
[  Debug ] 0 superfluous shows removed
[Error   ] Could find existing channel (xmltv_id=AIT Int'l UK) in the config file
[  Info  ]
[  Info  ]
[  Info  ]       i=index  .=same  c=change  g=gab  r=replace  n=new
[  Info  ]
[  Info  ]
[  Info  ] Group (0) :
[  Info  ] update requested for - 1 - out of - 1 - channels for 11 day(s)
[  Debug ]
[  Info  ] (   1/1   ) TVGUIDE.CO.UK -- chan. (xmltv_id=AIT Int'l UK) -- mode Force
[Error   ] Unable to update channel AIT Int'l UK
[Critical] See log file for details
[Critical] Exception.Message: '/tv/channel[@id = 'AIT Int'l UK']' has an invalid token.
[Critical] Exception.StackTrace:    at MS.Internal.Xml.XPath.XPathParser.CheckToken(LexKind t)
   at MS.Internal.Xml.XPath.XPathParser.ParsePredicate(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseExpresion(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion)
   at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
   at System.Xml.XPath.XPathNavigator.Select(String xpath)
   at System.Xml.XmlNode.SelectNodes(String xpath)
   at System.Xml.XmlNode.SelectSingleNode(String xpath)
   at WGconsole.XmlTarget.InsertChannelLogo(String channelId, String channelLogo)
   at WGconsole.Program.UpdateChannel(String strIndex, ChannelToUpdate Chan, XmlTarget xTarget)
   at WGconsole.Program.ConsoleApplication(String[] args)
[Warning ] Attempt to restore existing guide data failed! - no data to restore
[Warning ] Exception: System.Xml.XPath.XPathException: '/tv/channel[@id = 'AIT Int'l UK']' has an invalid token.
   at MS.Internal.Xml.XPath.XPathParser.CheckToken(LexKind t)
   at MS.Internal.Xml.XPath.XPathParser.ParsePredicate(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseExpresion(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion)
   at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
   at System.Xml.XPath.XPathNavigator.Select(String xpath)
   at System.Xml.XmlNode.SelectNodes(String xpath)
   at System.Xml.XmlNode.SelectSingleNode(String xpath)
   at WGconsole.XmlTarget.ReplaceChannel(String channelId, XmlDocument xdTv)
   at WGconsole.Program.ConsoleApplication(String[] args)
[  Debug ]
[  Debug ] 0 shows in 1 channels
[  Debug ] 0 updated shows
[  Info  ]
[  Info  ]
[        ] Job finished at 21/01/2017 13:58:13 done in 2s
[  Debug ] statistics upload error: The remote server returned an error: (500) Internal Server Error.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 5 hours

this is becuase whatever your viewing your channels.xml with is converting the encoded character like (& ' ect) to a actual & ' ect signs.

then you copying and pasting it to your webgrab++config.xml

use a editor that does not convert it like notepad,notepad++,ect

dont use web browser,ect that does.

 

digiboy72
Offline
Joined: 7 years
Last seen: 5 years
Blackbear199 wrote:

this is becuase whatever your viewing your channels.xml with is converting the encoded character like (& ' ect) to a actual & ' ect signs.

then you copying and pasting it to your webgrab++config.xml

use a editor that does not convert it like notepad,notepad++,ect

dont use web browser,ect that does.

I use Notepad++ to editing my conf.xml file. If i use & , then no errors, but if i use ' or ' or ' then i get errors.

    <channel update="i" site="tvguide.co.uk" site_id="537" xmltv_id="AIT Int&#39;l UK">AIT Int&#39;l UK</channel> - i get errors

    <channel update="i" site="tvguide.co.uk" site_id="537" xmltv_id="AIT Int l UK">AIT Int l UK</channel> - no errors

    <channel update="i" site="tv.sky.com" site_id="2408" xmltv_id="Discovery Home&amp;Health UK">Discovery Home&amp;Health UK</channel> - no errors

 

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 5 hours

ok,that means xml doesnt like the &#xx; format but &apos; shopuld be acceptable.

http://xml.silmaril.ie/specials.html

digiboy72
Offline
Joined: 7 years
Last seen: 5 years
Blackbear199 wrote:

ok,that means xml doesnt like the &#xx; format but &apos; shopuld be acceptable.

http://xml.silmaril.ie/specials.html

    <channel update="i" site="tvguide.co.uk" site_id="537" xmltv_id="AIT Int&apos;l UK">AIT Int&apos;l UK</channel>

and errors:

[        ]
[        ]              WebGrab+Plus/w MDB & REX Postprocess -- version  V1.57             
[        ]
[        ]                                 Jan van Straaten                                
[        ]                              Francis De Paemeleere                              
[        ]
[        ]             thanks to Paul Weterings and all the contributing users             
[        ] --------------------------------------------------------------------------------
[        ]
[        ] Job started at 21/01/2017 14:43:41
[  Debug ]
[  Debug ] Running  on: Microsoft Windows NT 6.1.7601 Service Pack 1
[  Debug ] Environment: 4.0.30319.42000
[  Debug ]
[  Debug ] Loading timezone data
[  Debug ] Embedded timezones source: WGconsole.WG.Common.timezonesdata.txt
[  Debug ] Reading config file: C:\EPG\RAPID\UK\WebGrab++.config.xml
[  Info  ] found: C:\EPG\\UK\tvguide.co.uk.ini -- Revision 14
[  Debug ] xmltv input file - C:\Bitnami\wampstack\apache2\htdocs\\UK1_guide.xml - found
[  Debug ] 0 superfluous shows removed
[Error   ] Could find existing channel (xmltv_id=AIT Int'l UK) in the config file
[  Info  ]
[  Info  ]
[  Info  ]       i=index  .=same  c=change  g=gab  r=replace  n=new
[  Info  ]
[  Info  ]
[  Info  ] Group (0) :
[  Info  ] update requested for - 1 - out of - 1 - channels for 11 day(s)
[  Debug ]
[  Info  ] (   1/1   ) TVGUIDE.CO.UK -- chan. (xmltv_id=AIT Int'l UK) -- mode Force
[Error   ] Unable to update channel AIT Int'l UK
[Critical] See log file for details
[Critical] Exception.Message: '/tv/channel[@id = 'AIT Int'l UK']' has an invalid token.
[Critical] Exception.StackTrace:    at MS.Internal.Xml.XPath.XPathParser.CheckToken(LexKind t)
   at MS.Internal.Xml.XPath.XPathParser.ParsePredicate(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseExpresion(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion)
   at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
   at System.Xml.XPath.XPathNavigator.Select(String xpath)
   at System.Xml.XmlNode.SelectNodes(String xpath)
   at System.Xml.XmlNode.SelectSingleNode(String xpath)
   at WGconsole.XmlTarget.InsertChannelLogo(String channelId, String channelLogo)
   at WGconsole.Program.UpdateChannel(String strIndex, ChannelToUpdate Chan, XmlTarget xTarget)
   at WGconsole.Program.ConsoleApplication(String[] args)
[Warning ] Attempt to restore existing guide data failed! - no data to restore
[Warning ] Exception: System.Xml.XPath.XPathException: '/tv/channel[@id = 'AIT Int'l UK']' has an invalid token.
   at MS.Internal.Xml.XPath.XPathParser.CheckToken(LexKind t)
   at MS.Internal.Xml.XPath.XPathParser.ParsePredicate(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseExpresion(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion)
   at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
   at System.Xml.XPath.XPathNavigator.Select(String xpath)
   at System.Xml.XmlNode.SelectNodes(String xpath)
   at System.Xml.XmlNode.SelectSingleNode(String xpath)
   at WGconsole.XmlTarget.ReplaceChannel(String channelId, XmlDocument xdTv)
   at WGconsole.Program.ConsoleApplication(String[] args)
[  Debug ]
[  Debug ] 0 shows in 1 channels
[  Debug ] 0 updated shows
[  Debug ] 192 new shows added
[  Info  ]
[  Info  ]
[        ] Job finished at 21/01/2017 14:43:46 done in 5s
[  Debug ] statistics upload error: The remote server returned an error: (500) Internal Server Error.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 5 hours

i think this is a webgrab error that should not happen.

just out of curiosity try this..

    <channel update="i" site="tvguide.co.uk" site_id="537" xmltv_id="AIT Int\&apos;l UK">AIT Int\&apos;l UK</channel>

the \ might escape the &apos;(') character if webgrab is using regex to read these valuse internally.the ' has special meaning to regex.adding the \ tells it to use it as a actual ' and not its special meaning.

 

digiboy72
Offline
Joined: 7 years
Last seen: 5 years
Blackbear199 wrote:

i think this is a webgrab error that should not happen.

just out of curiosity try this..

    <channel update="i" site="tvguide.co.uk" site_id="537" xmltv_id="AIT Int\&apos;l UK">AIT Int\&apos;l UK</channel>

the \ might escape the &apos;(') character if webgrab is using regex to read these valuse internally.the ' has special meaning to regex.adding the \ tells it to use it as a actual ' and not its special meaning.

Now webgrab grabbs the guide, but display-name is wrong and still errors...

guide.xml:

  <channel id="AIT Int\'l UK">
    <display-name lang="en">AIT Int\'l UK</display-name>
    <url>http://www.tvguide.co.uk</url>
  </channel>

log.txt:

[        ]
[        ]              WebGrab+Plus/w MDB & REX Postprocess -- version  V1.57             
[        ]
[        ]                                 Jan van Straaten                                
[        ]                              Francis De Paemeleere                              
[        ]
[        ]             thanks to Paul Weterings and all the contributing users             
[        ] --------------------------------------------------------------------------------
[        ]
[        ] Job started at 21/01/2017 14:50:45
[  Debug ]
[  Debug ] Running  on: Microsoft Windows NT 6.1.7601 Service Pack 1
[  Debug ] Environment: 4.0.30319.42000
[  Debug ]
[  Debug ] Loading timezone data
[  Debug ] Embedded timezones source: WGconsole.WG.Common.timezonesdata.txt
[  Debug ] Reading config file: C:\EPG\RAPID\UK\WebGrab++.config.xml
[  Info  ] found: C:\EPG\\UK\tvguide.co.uk.ini -- Revision 14
[  Debug ] xmltv input file - C:\Bitnami\wampstack\apache2\htdocs\\UK1_guide.xml - found
[  Debug ] 0 superfluous shows removed
[Error   ] Could find existing channel (xmltv_id=AIT Int\'l UK) in the config file
[  Info  ]
[  Info  ]
[  Info  ]       i=index  .=same  c=change  g=gab  r=replace  n=new
[  Info  ]
[  Info  ]
[  Info  ] Group (0) :
[  Info  ] update requested for - 1 - out of - 1 - channels for 11 day(s)
[  Debug ]
[  Info  ] (   1/1   ) TVGUIDE.CO.UK -- chan. (xmltv_id=AIT Int\'l UK) -- mode Force
[Error   ] Unable to update channel AIT Int\'l UK
[Critical] See log file for details
[Critical] Exception.Message: '/tv/channel[@id = 'AIT Int\'l UK']' has an invalid token.
[Critical] Exception.StackTrace:    at MS.Internal.Xml.XPath.XPathParser.CheckToken(LexKind t)
   at MS.Internal.Xml.XPath.XPathParser.ParsePredicate(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseExpresion(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion)
   at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
   at System.Xml.XPath.XPathNavigator.Select(String xpath)
   at System.Xml.XmlNode.SelectNodes(String xpath)
   at System.Xml.XmlNode.SelectSingleNode(String xpath)
   at WGconsole.XmlTarget.InsertChannelLogo(String channelId, String channelLogo)
   at WGconsole.Program.UpdateChannel(String strIndex, ChannelToUpdate Chan, XmlTarget xTarget)
   at WGconsole.Program.ConsoleApplication(String[] args)
[  Info  ] No guide data to restore
[  Debug ]
[  Debug ] 192 shows in 1 channels
[  Debug ] 0 updated shows
[  Debug ] 192 new shows added
[  Info  ]
[  Info  ]
[        ] Job finished at 21/01/2017 14:50:57 done in 12s
[  Debug ] statistics upload error: The remote server returned an error: (500) Internal Server Error.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 5 hours

hmm notice the ']

'/tv/channel[@id = 'AIT Int\'l UK']' has an invalid token.

this is definitely a webgrab error.

 

digiboy72
Offline
Joined: 7 years
Last seen: 5 years

Ok, can you inform authors about this?

digiboy72
Offline
Joined: 7 years
Last seen: 5 years

I found temporary resolution:

    <channel update="i" site="tvguide.co.uk" site_id="537" xmltv_id="AIT Int l UK">AIT Int l UK</channel>
    <channel offset="0" same_as="AIT Int l UK" xmltv_id="AIT Int&apos;l UK">AIT Int&apos;l UK</channel>   

Works.

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl