Windows Phone でのXML ファイルの処理に従って、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")] はどのようになりますか? ここで何かが正しく機能していません...事前に助けてくれてありがとう!