2014-10-16, 09:06
Please, if this is in the wrong thread, move to correct thread.
I'm a Dev for Media Companion, third-party media manager, and today I attempted to open some exported episodes from Kodi, using Media Companion's normal xml routines.
And I received an error stating: Multiple Root Elements.
I found that each episode in the multiepisode nfo was placed within <episodedetails></episodedetails>, so for this example, there were two lots of episodedetails nodes, and no Root Element.
EG:
Where as in Media Companion, we use a Root Element
Now, I am by no means an expert, but shouldn't the xml file from XBMC\Kodi be compliant with the XML standard? I read on Wiki and xmlfiles.com that there should always be a root element.
Media Companion's simple nfo validation fails
If I am wrong, and I probably am, if someone could give me an example of how to read the multi-episode xml file .
And thank you all for XBMC and Kodi. It's a great program and is in use daily in mine and friends homes. Keep up the good work.
I'm a Dev for Media Companion, third-party media manager, and today I attempted to open some exported episodes from Kodi, using Media Companion's normal xml routines.
And I received an error stating: Multiple Root Elements.
I found that each episode in the multiepisode nfo was placed within <episodedetails></episodedetails>, so for this example, there were two lots of episodedetails nodes, and no Root Element.
EG:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<episodedetails>
<title>Vendetta</title>
<showtitle>Arrow</showtitle>
<rating>7.500000</rating>
<epbookmark>0.000000</epbookmark>
<year>0</year>
<top250>0</top250>
<season>1</season>
<episode>8</episode>
<uniqueid>4408785</uniqueid>
<displayseason>-1</displayseason>
<displayepisode>-1</displayepisode>
<votes>186</votes>
<outline></outline>
<plot>As Oliver and Helena grow closer, Oliver trains her to be his ally, complete with showing her how to use a crossbow. Diggle disapproves of Oliver sharing his secret with Helena as he’s not sure she can be trusted</plot>
<tagline></tagline>
<runtime>71582788</runtime>
<thumb>http://thetvdb.com/banners/episodes/257655/4408785.jpg</thumb>
<mpaa>TV-PG</mpaa>
<playcount>0</playcount>
<lastplayed></lastplayed>
<id></id>
<set></set>
<premiered>2012-10-10</premiered>
<status></status>
<code></code>
<aired>2012-12-05</aired>
<studio>The CW</studio>
<trailer></trailer>
<resume>
<position>0.000000</position>
<total>0.000000</total>
</resume>
<dateadded>2014-10-16 16:57:23</dateadded>
</episodedetails>
<episodedetails>
<title>Year's End</title>
<showtitle>Arrow</showtitle>
<rating>7.500000</rating>
<epbookmark>0.000000</epbookmark>
<year>0</year>
<top250>0</top250>
<season>1</season>
<episode>9</episode>
<uniqueid>4415147</uniqueid>
<displayseason>-1</displayseason>
<displayepisode>-1</displayepisode>
<votes>189</votes>
<outline></outline>
<plot>Oliver discovers that after he and his father went missing, Moira and Thea stopped celebrating Christmas. Determined to make up for lost time and restore a sense of normalcy to the Queen household</plot>
<tagline></tagline>
<runtime>71582788</runtime>
<thumb>http://thetvdb.com/banners/episodes/257655/4415147.jpg</thumb>
<mpaa>TV-PG</mpaa>
<playcount>0</playcount>
<lastplayed></lastplayed>
<id></id>
<set></set>
<premiered>2012-10-10</premiered>
<status></status>
<code></code>
<aired>2012-12-12</aired>
<studio>The CW</studio>
<trailer></trailer>
<resume>
<position>0.000000</position>
<total>0.000000</total>
</resume>
<dateadded>2014-10-16 16:57:23</dateadded>
</episodedetails>
Where as in Media Companion, we use a Root Element
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<multiepisodenfo>
<episodedetails>
<fileinfo>
Now, I am by no means an expert, but shouldn't the xml file from XBMC\Kodi be compliant with the XML standard? I read on Wiki and xmlfiles.com that there should always be a root element.
Media Companion's simple nfo validation fails
Code:
Dim tvshow As New XmlDocument
Try
tvshow.Load(nfopath)
Catch ex As Exception
validated = False
End Try
If I am wrong, and I probably am, if someone could give me an example of how to read the multi-episode xml file .
And thank you all for XBMC and Kodi. It's a great program and is in use daily in mine and friends homes. Keep up the good work.