update xml parsing

This commit is contained in:
Luke Pulverenti
2016-12-03 18:57:34 -05:00
parent 83ad945015
commit 7ed6c67db0
12 changed files with 293 additions and 52 deletions

View File

@@ -218,6 +218,11 @@ namespace MediaBrowser.MediaEncoding.Probing
switch (reader.Name)
{
case "dict":
if (reader.IsEmptyElement)
{
reader.Read();
continue;
}
using (var subtree = reader.ReadSubtree())
{
ReadFromDictNode(subtree, info);
@@ -279,9 +284,14 @@ namespace MediaBrowser.MediaEncoding.Probing
}
break;
case "array":
if (!string.IsNullOrWhiteSpace(currentKey))
if (reader.IsEmptyElement)
{
using (var subtree = reader.ReadSubtree())
reader.Read();
continue;
}
using (var subtree = reader.ReadSubtree())
{
if (!string.IsNullOrWhiteSpace(currentKey))
{
pairs.AddRange(ReadValueArray(subtree));
}
@@ -315,6 +325,12 @@ namespace MediaBrowser.MediaEncoding.Probing
switch (reader.Name)
{
case "dict":
if (reader.IsEmptyElement)
{
reader.Read();
continue;
}
using (var subtree = reader.ReadSubtree())
{
var dict = GetNameValuePair(subtree);