Лучший способ десериализации этого XML в объект

В других примерах, которые я видел, которые похожи на мой, есть корневой узел, затем узел массива, а затем кучу элементов массива. Моя проблема в том, что мой корневой узел - это мой узел массива, поэтому примеры, которые я видел, мне не подходят, и я не могу изменить схему XML. Вот XML:

<articles>  
    <article>
      <guid>7f6da9df-1a91-4e20-8b66-07ac7548dc47</guid>
      <order>1</order>
      <type>deal_abstract</type>
      <textType></textType>
      <id></id>
      <title>Abu Dhabi's IPIC Eyes Bond Sale After Cepsa Buy</title>
      <summary>Abu Dhabi's IPIC has appointed banks for a potential sterling and euro-denominated bond issue, a document showed on Wednesday, after the firm acquired Spain's Cepsa in a $5 billion deal earlier this month...</summary>
      <readmore></readmore>
      <fileName></fileName>
      <articleDate>02/24/2011 00:00:00 AM</articleDate>
      <articleDateType></articleDateType>
    </article>

    <article>
      <guid>1c3e57a0-c471-425a-87dd-051e69ecb7c5</guid>
      <order>2</order>
      <type>deal_abstract</type>
      <textType></textType>
      <id></id>
      <title>Big Law Abuzz Over New China Security Review</title>
      <summary>China’s newly established foreign investment M&amp;A review committee has been the subject of much legal chatter in the Middle Kingdom and beyond. Earlier this month, the State Council unveiled legislative guidance on…</summary>
      <readmore></readmore>
      <fileName></fileName>
      <articleDate>02/23/2011 00:00:00 AM</articleDate>
      <articleDateType></articleDateType>
    </article>  
</articles>

Вот мой класс:

public class CurrentsResultsList
{
    public Article[] Articles;
}

public class Article
{
    public string Guid { get; set; }
    public int Order { get; set; }
    public string Type { get; set; }
    public string Title { get; set; }
    public string Summary { get; set; }
    public DateTime ArticleDate { get; set; }
}

Это XML-ответ от внешнего API.

5
задан Kris Ivanov 4 March 2011 в 19:28
поделиться