tvguide.xml from microsoft is giving parsing EntityName error (1 Viewer)

wolfster

New Member
August 14, 2015
2
0
44
Home Country
United States of America United States of America
Windows 10, MP 1.12.
Using donation version of mc2xml from microsoft to create tvguide.xml

Once I switched to the donated version of mc2xml and the microsoft server I get a parsing EntityName error.
It appears to come from a "&" in the icon url.
Any ideas on how to fix this so I can get my tvguide back?
Thank you so much for the help.


Here is the error log.

[2015-08-13 20:35:26,559] [Log ] [XmlTvImporter] [ERROR] - XML tv import error loading C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv\tvguide.xml err:An error occurred while parsing EntityName. Line 751, position 208.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseEntityName()
at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.SkipSubtree()
at System.Xml.XmlReader.ReadToNextSibling(String name)
at TvEngine.XMLTVImport.Import(String fileName, Boolean deleteBeforeImport, Boolean showProgress)
[2015-08-13 20:35:26,574] [Log ] [XmlTvImporter] [INFO ] - Xmltv: imported 93 channels, 0 programs status:tvguide.xml:Invalid XML file:An error occurred while parsing EntityName. Line 751, position 208.;
[2015-08-13 20:35:26,590] [Log ] [XmlTvImporter] [INFO ] - Xmltv: waiting for database to finish inserting imported programs.
[2015-08-13 20:35:26,590] [Log ] [XmlTvImporter] [INFO ] - plugin:xmltv import done



Here is my tvguide.xml. The icon tag is in line 751, position 208 is near the "&" symbol.


<category lang="en">Other</category>
<category lang="en">comedy</category>
<icon src="http://images-eds.xboxlive.com/imag...pvhZt_zo15TFd2jhJBjNkRMQHUL0mxA--&w=267&h=150" />
<episode-num system="ms_progid">1.309778281</episode-num>
<episode-num system="onscreen">16</episode-num>
<video>
<aspect>16:9</aspect>
<quality>HDTV</quality>
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello and welcome! :)

    It appears to come from a "&" in the icon url.
    I concur.

    Any ideas on how to fix this so I can get my tvguide back?
    Ampersand ("&") is a special character in XML. It is meant to be encoded as "&amp;". You can get your guide back by replacing the & with &amp;... but to avoid the problem in future I would also strongly suggest you report this issue to the mc2xml developer. That's something he or she should fix.

    Regards,
    mm
     

    RonD

    Test Group
  • Team MediaPortal
  • December 20, 2011
    911
    278
    SillyValley CA
    Home Country
    United States of America United States of America
    wolfster, if you are comfortable with typing in the command line, open a cmd.exe window, cd to your mc2xml folder with tvguide.xml, make a backup of your tvguide.xml file and try the following to get rid of the line that has the <icon

    findstr /V "<icon" tvguide.xml > guidetmp.xml
    copy guidetmp.xml tvguide.xml

    if you type findstr /? the help output shows the following

    /V Prints only lines that do not contain a match

    but if this is the problem, you need to let the mc2xml.exe programmer know about the problem so he can get a real fix put in
     
    Last edited:

    wolfster

    New Member
    August 14, 2015
    2
    0
    44
    Home Country
    United States of America United States of America
    Wow. Thank you for the help.
    I ended up doing what RonD suggested. First windows scheduler runs a batch file to downloads the data to tvguide_raw.xml. Then a few minutes later it runs my batch file to get rid of the icon line in the xml. It puts the results in tvguide.xml where mediaportal can see that it has changed. Thank you so much for the fix! I will let the developer know what it is doing.

    Here are my two batch files
    First I run mc2xml

    mc2xml -a -A -c us -g 53090 -o tvguide_raw.xml

    Then I write the new file without the "icon" line in it.

    cd C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv
    findstr /V "<icon" tvguide_raw.xml > tvguide.xml
     

    Users who are viewing this thread

    Top Bottom