【发布时间】:2012-07-27 07:56:23
【问题描述】:
我正在尝试根据Handling XML files on Windows Phone反序列化 windows phone 上的 XML 文件
XML 文件与此类似
<positions>
<POS LAT=12312312 LON=23113123\>
</positions>
在我使用的 C# 中,
[XMLRoot("positions")]
public class Positions
{
[XmlArray] //These two lines seem to be where the problem is...
[XmlArrayItem("POS")]
public ObservableCollection<POS> Collection {get;set;}
}
类 POS.cs 看起来像
public class POS.cs
{
[XMLAttribute("LAT")]
public string LAT{get;set;}
[XmlArray("FOO")] 和 [XmlArrayItem("BAR")] 应该是什么样的? 这里有些东西不能正常工作...... 感谢您的帮助!
【问题讨论】:
标签: c#