tvguide.xml from microsoft is giving parsing EntityName error

Discussion in 'xmlTV' started by wolfster, August 14, 2015.

  1. wolfster

    wolfster New Member

    Joined:
    August 14, 2015
    Messages:
    2
    Likes Received:
    0
    Gender:
    Male
    Ratings:
    +0 / 0
    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>
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Hello and welcome! :)

    I concur.

    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
     
  4. RonD
    • Team MediaPortal

    RonD Test Group

    Joined:
    December 20, 2011
    Messages:
    904
    Likes Received:
    119
    Occupation:
    semi-pro slacker
    Location:
    SillyValley CA
    Ratings:
    +275 / 0
    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: August 14, 2015
    • Thank You! Thank You! x 1
  5. wolfster

    wolfster New Member

    Joined:
    August 14, 2015
    Messages:
    2
    Likes Received:
    0
    Gender:
    Male
    Ratings:
    +0 / 0
    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
     
  6. RonD
    • Team MediaPortal

    RonD Test Group

    Joined:
    December 20, 2011
    Messages:
    904
    Likes Received:
    119
    Occupation:
    semi-pro slacker
    Location:
    SillyValley CA
    Ratings:
    +275 / 0
    Home Country:
    United States of America United States of America
    thanks for reporting the fix/workaround works, probably could do all the steps in 1 run_mc2xml.cmd ( or.bat) file. Noticed there is an updated mc2xml/donator version on the http://mc2xml.hosterbox.net/ webpage for "<icon &" problems
     
    • Thank You! Thank You! x 1
  7. dfraga

    dfraga Portal Member

    Joined:
    June 8, 2015
    Messages:
    45
    Likes Received:
    1
    Gender:
    Male
    Ratings:
    +1 / 0
    Home Country:
    United States of America United States of America
    The update to the donator version worked like a charm for me. Thanks!
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!