我已经阅读了其他一些帖子,但我无法实现我想要做的事情。
这是我目前用于反序列化数据的方法
public static T Deserialize<T>(string serializedString)
{
using (Stream s = new MemoryStream(Encoding.UTF8.GetBytes(serializedString)))
{
var serXml = new XmlSerializer(typeof(T));
T item = (T)serXml.Deserialize(s);
return item;
}
}
问题是我的角色失败了。
System.Xml.XmlException:'',十六进制值0x0B,是无效字符。
我无法控制vimeo提要,所以我需要能够在我的结尾适当地反序列化字符串。我错过了一些傻事吗?
注意:我一直在研究XmlTextReader,但我读过它不应该被使用。
这是从serializedString
参数
<?xml version="1.0" encoding="UTF-8"?>
<videos>
<!-- hacked out a few videos from when they worked.
StackOverflow was complaining about the length of the post -->
<video><id>35524605</id><title>A Year of Success: Work</title><description>Series: A Year of Success<br />
Sermon: Work<br />
Speaker: Geoff Heth<br />
Scripture: John 13<br />
Date: January 21 & 22, 2012</description><url>http://vimeo.com/35524605</url><upload_date>2012-01-23 14:10:00</upload_date><mobile_url>http://vimeo.com/m/35524605</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/242/906/242906651_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/242/906/242906651_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/242/906/242906651_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>60</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>2227</duration><width>1280</width><height>720</height><tags>a year of success, work, geoff heth, john 13, january 21, january 22</tags><embed_privacy>anywhere</embed_privacy></video><video><id>35149699</id><title>A Year of Success: Spirituality</title><description>Series: A Year of Success<br />
Sermon: Spirituality<br />
Speaker: Tim Moore<br />
Scripture: John 15<br />
Date: January 14 & 15, 2012</description><url>http://vimeo.com/35149699</url><upload_date>2012-01-16 12:38:23</upload_date><mobile_url>http://vimeo.com/m/35149699</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/239/968/239968893_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/239/968/239968893_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/239/968/239968893_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>43</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>2871</duration><width>1280</width><height>720</height><tags>a year of success, spirituality, tim moore, john 15, january 15, January 14</tags><embed_privacy>anywhere</embed_privacy></video><video><id>34789964</id><title>A Year of Success: Relationships</title><description>Series: A Year of Success<br />
Sermon: Relationships<br />
Speaker: Ron Gray<br />
Scripture: John 13:34,35<br />
Date: January 7 & 8, 2012</description><url>http://vimeo.com/34789964</url><upload_date>2012-01-09 11:15:53</upload_date><mobile_url>http://vimeo.com/m/34789964</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/237/215/237215947_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/237/215/237215947_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/237/215/237215947_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>76</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>2128</duration><width>1280</width><height>720</height><tags>John 13, January 7, January 8, A year of success, relationships, ron gray</tags><embed_privacy>anywhere</embed_privacy></video><video><id>33914231</id><title>When God Broke In: The Shepherds</title><description>Series: When God Broke In<br />
Sermon: The Shepherds<br />
Speaker: Geoff Heth<br />
Scripture: Luke 2:8-20<br />
Date: December 17 & 18<br />
<br />
BIG IDEA:God again announces His love for all of us and gives us hope for the future.</description><url>http://vimeo.com/33914231</url><upload_date>2011-12-19 11:14:25</upload_date><mobile_url>http://vimeo.com/m/33914231</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/230/541/230541509_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/230/541/230541509_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/230/541/230541509_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>87</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>2076</duration><width>1280</width><height>720</height><tags>When God Broke In, Shepherds, Geoff Heth, Luke, December 17, December 18</tags><embed_privacy>anywhere</embed_privacy></video><video><id>33540401</id><title>When God Broke In: Mary & Joseph</title><description>Series: When God Broke In<br />
Sermon: Mary & Joseph<br />
Speaker: Ron Gray<br />
Scripture: Luke 1:26-38; Matthew 1:18-25<br />
Date: December 10 & 11, 2011</description><url>http://vimeo.com/33540401</url><upload_date>2011-12-12 11:26:54</upload_date><mobile_url>http://vimeo.com/m/33540401</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/227/715/227715871_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/227/715/227715871_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/227/715/227715871_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>47</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>2119</duration><width>1280</width><height>720</height><tags>When God Broke In, Mary, Joseph, Ron Gray, Luke, Matthew, December 10, December 11</tags><embed_privacy>anywhere</embed_privacy></video><video><id>33168687</id><title>When God Broke In: Zechariah</title><description>Series: When God Broke In<br />
Sermon: Zechariah<br />
Speaker: Erik McRitchie<br />
Scripture: Luke 1:5-25, 57-80<br />
Date: December 3 & 4, 2011</description><url>http://vimeo.com/33168687</url><upload_date>2011-12-05 12:45:36</upload_date><mobile_url>http://vimeo.com/m/33168687</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/224/927/224927953_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/224/927/224927953_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/224/927/224927953_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>72</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>1819</duration><width>1280</width><height>720</height><tags>When God Broke In, Zechariah, Erik McRitchie, Luke, December 3, December 4</tags><embed_privacy>anywhere</embed_privacy></video><video><id>32791671</id><title>Made Right - Romans: Kingdom Rules Part 3</title><description>Series: Made Right - Romans <br />
Sermon: Kingdom Rules pt. 3<br />
Speaker: Ron Gray, Brian Delamont<br />
Scripture: Romans 14-15<br />
Date: November 26 & 27</description><url>http://vimeo.com/32791671</url><upload_date>2011-11-28 11:35:27</upload_date><mobile_url>http://vimeo.com/m/32791671</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/222/079/222079267_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/222/079/222079267_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/222/079/222079267_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>26</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>527</duration><width>1280</width><height>720</height><tags>Made Right, Romans, Kingdom Rules, Ron Gray, Brian Delamont, November 26, November 27</tags><embed_privacy>anywhere</embed_privacy></video><video><id>32791416</id><title>Made Right - Romans: Kingdom Rules Part 2</title><description>Series: Made Right - Romans <br />
Sermon: Kingdom Rules pt. 2<br />
Speaker: Ron Gray, Brian Delamont<br />
Scripture: Romans 14-15<br />
Date: November 26 & 27</description><url>http://vimeo.com/32791416</url><upload_date>2011-11-28 11:31:07</upload_date><mobile_url>http://vimeo.com/m/32791416</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/222/076/222076112_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/222/076/222076112_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/222/076/222076112_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>13</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>591</duration><width>1280</width><height>720</height><tags>Made Right, Kingdom Rules, Ron Gray, Brian Delamont, Romans, November 26, November 27</tags><embed_privacy>anywhere</embed_privacy></video><video><id>32792125</id><title>Made Right - Romans: Kingdom Rules Part 1</title><description>Series: Made Right - Romans<br />
Sermon: Kingdom Rules<br />
Speaker: Ron Gray, Brian Delamont<br />
Scripture: Romans 14-15<br />
Date: November 26 & 27, 2011</description><url>http://vimeo.com/32792125</url><upload_date>2011-11-28 11:43:13</upload_date><mobile_url>http://vimeo.com/m/32792125</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/222/082/222082190_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/222/082/222082190_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/222/082/222082190_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>28</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>946</duration><width>1280</width><height>720</height><tags>Made Right, Kingdom Rules, Ron Gray, Brian Delamont, Romans, November 26, November 27</tags><embed_privacy>anywhere</embed_privacy></video><video><id>32453817</id><title>Made Right - Romans: Submission</title><description>Series: Made Right - Romans<br />
Sermon: Submission<br />
Speaker: Jason Koleba<br />
Scripture: Romans 13<br />
Date: November 19 & 20, 2011<br />
<br />
The BIG idea: Our ability to make an impact as leaders and as a church, rests not only with our readiness to lead, do things and be proactive, but also in our ability to humbly submit.</description><url>http://vimeo.com/32453817</url><upload_date>2011-11-21 10:55:06</upload_date><mobile_url>http://vimeo.com/m/32453817</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/219/552/219552106_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/219/552/219552106_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/219/552/219552106_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>22</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>2106</duration><width>1280</width><height>720</height><tags>Made Right, Romans, Submission, Jason Koleba, Romans 13, November 19</tags><embed_privacy>anywhere</embed_privacy></video><video><id>32090108</id><title>Made Right - Romans: We Are Family</title><description>Series: Made Right - Romans<br />
Sermon: We Are Family<br />
Speaker: Brent Sellers<br />
Scripture: Romans 12<br />
Date: November 12, 2011</description><url>http://vimeo.com/32090108</url><upload_date>2011-11-14 11:09:27</upload_date><mobile_url>http://vimeo.com/m/32090108</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/216/803/216803372_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/216/803/216803372_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/216/803/216803372_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>96</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>2146</duration><width>1280</width><height>720</height><tags>made right, romans, we are family, brent sellers, romans 12, November 12</tags><embed_privacy>anywhere</embed_privacy></video><video><id>31739785</id><title>It Starts With A Girl</title><description>The Girls At Risk school in Niger, Africa provides a future for girls through training, education, and a community. Watch this documentary on how Girls At Risk is providing girls with a new-found life and hope.</description><url>http://vimeo.com/31739785</url><upload_date>2011-11-07 12:44:25</upload_date><mobile_url>http://vimeo.com/m/31739785</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/214/094/214094295_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/214/094/214094295_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/214/094/214094295_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>27</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>385</duration><width>1280</width><height>720</height><tags>girls at risk, niger, africa</tags><embed_privacy>anywhere</embed_privacy></video><video><id>31738299</id><title>Why Should We Go On Missions?</title><description>A short video on the benefits of going on a short term mission, and how God provides opportunities for us to grow through missions.</description><url>http://vimeo.com/31738299</url><upload_date>2011-11-07 12:19:29</upload_date><mobile_url>http://vimeo.com/m/31738299</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/214/083/214083217_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/214/083/214083217_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/214/083/214083217_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>18</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>256</duration><width>1280</width><height>720</height><tags>missions</tags><embed_privacy>anywhere</embed_privacy></video><video><id>31735476</id><title>Made Right - Romans: Good News for Everyone</title><description>Series: Made Right - Romans<br />
Sermon: Good News for Everyone<br />
Speaker: Dennis & Dorrie Hansen, and Rebecca Trask<br />
Scripture: Romans 10<br />
Date: November 6, 2011<br />
<br />
The BIG idea: Nothing can separate us from the love of God. <br />
It is this truth that motivates an urgency for mission.</description><url>http://vimeo.com/31735476</url><upload_date>2011-11-07 11:33:06</upload_date><mobile_url>http://vimeo.com/m/31735476</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/214/063/214063669_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/214/063/214063669_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/214/063/214063669_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>76</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>2396</duration><width>1280</width><height>720</height><tags>Made right, romans, Good news for everyone, missions, Dennis hansen, dorrie hansen, rebecca trask, romans 10, November 6</tags><embed_privacy>anywhere</embed_privacy></video><video><id>31379429</id><title>Made Right - Romans: Life Through the Spirit</title><description>Series: Made Right - Romans<br />
Sermon: Life Through the Spirit<br />
Speaker: Ron Gray<br />
Scripture: Romans 8<br />
Date: October 30, 2011</description><url>http://vimeo.com/31379429</url><upload_date>2011-10-31 11:36:34</upload_date><mobile_url>http://vimeo.com/m/31379429</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/211/425/211425953_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/211/425/211425953_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/211/425/211425953_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>57</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>1949</duration><width>1280</width><height>720</height><tags>Romans, Made Right, Life Through the Spirit, Ron Gray, October 30</tags><embed_privacy>anywhere</embed_privacy></video><video><id>31041561</id><title>Mark Mittelberg - 20 Reasons You Can Be Confident Christianity Is True</title><description>Mark Mittelberg gives us a powerful and encouraging seminar on "20 Reasons You Can Be Confident Christianity Is True". This is for anyone (even the skeptics) with questions on Christianity.</description><url>http://vimeo.com/31041561</url><upload_date>2011-10-24 14:50:13</upload_date><mobile_url>http://vimeo.com/m/31041561</mobile_url><thumbnail_small>http://b.vimeocdn.com/ts/208/872/208872031_100.jpg</thumbnail_small><thumbnail_medium>http://b.vimeocdn.com/ts/208/872/208872031_200.jpg</thumbnail_medium><thumbnail_large>http://b.vimeocdn.com/ts/208/872/208872031_640.jpg</thumbnail_large><user_name>RockPointe Church</user_name><user_url>http://vimeo.com/rockpointe</user_url><user_portrait_small>http://b.vimeocdn.com/ps/196/827/1968276_30.jpg</user_portrait_small><user_portrait_medium>http://b.vimeocdn.com/ps/196/827/1968276_75.jpg</user_portrait_medium><user_portrait_large>http://b.vimeocdn.com/ps/196/827/1968276_100.jpg</user_portrait_large><user_portrait_huge>http://b.vimeocdn.com/ps/196/827/1968276_300.jpg</user_portrait_huge><stats_number_of_likes>0</stats_number_of_likes><stats_number_of_plays>217</stats_number_of_plays><stats_number_of_comments>0</stats_number_of_comments><duration>5726</duration><width>1280</width><height>720</height><tags>Mark Mittelberg, Christianity is true</tags><embed_privacy>anywhere</embed_privacy></video></videos>
答案 0 :(得分:0)
您发布的XML看起来很好;你要么“砍掉”造成问题的角色,要么你发布了serializedString
的消毒版本。
XML只需包含可打印字符,而0x0B不可打印,因此serXml.Deserialize
正在做正确的事情。您必须找到不可打印的字符并决定如何处理它们。类似的东西:
using (var sr = new MemoryStream(Encoding.UTF8.GetBytes(serializedString)))
{
int line = 0;
string s;
while ((s = sr.ReadLine()) != null)
{
line++;
for (int i = 0; i < s.Length; i++)
{
char c = s[i];
if (char.IsControl(c))
Console.WriteLine("Line " + line + ", char " + i + " is invalid char " + (int)c);
}
}
}
会显示serializedString
的哪些字符不好。无论你得到什么serializedString
都必须修复。