<div class="field field-name-field-body-small field-type-text-long field-label-hidden">The evolution of your League of Legends match history is now live!
</div>
<div class="field field-name-field-article-media field-type-file field-label-hidden">
<div id="file-13180" class="file file-image file-image-jpeg">
<img typeof="foaf:Image" src="/sites/default/files/styles/large/public/upload/mh_640x360.jpg?itok=z_Nn84Op" width="480" height="270" alt="" title="" />
</div>
</div>
<div class="field field-name-custom-author field-type-entityreference field-label-hidden">
<span class="article_detail"><span class="posted_by">By Riot MattEnth</span>
</span></div>
< /code>
Я хочу текст в первой строке, который в этом примере содержит (в правом правом фрагменте кода) < /p>
The evolution of your League of Legends match history is now live!
Есть ли простой способ сделать это с моим следующим кодом? Прямо сейчас он возвращает всю строку мусора. < /P>
XDocument xmlFile = XDocument.Load(@"http://na.leagueoflegends.com/en/rss.xml");
var LoLdescriptions = from service in xmlFile.Descendants("item")
select (string)service.Element("description");
ViewBag.descriptions = LoLdescriptions.ToArray();
...moving into View...
@ViewBag.descriptions[0]
< /code>
Если это не сложно, есть ли также способ получить последнюю строку? В этом случае по бунте Mattenth
У меня есть тег, и я пытаюсь получить из него фактический текст.[code] <div class="field field-name-field-body-small field-type-text-long field-label-hidden">The evolution of your League of Legends match history is now live! </div> <div class="field field-name-field-article-media field-type-file field-label-hidden"> <div id="file-13180" class="file file-image file-image-jpeg"> <img typeof="foaf:Image" src="/sites/default/files/styles/large/public/upload/mh_640x360.jpg?itok=z_Nn84Op" width="480" height="270" alt="" title="" /> </div> </div> <div class="field field-name-custom-author field-type-entityreference field-label-hidden"> <span class="article_detail"><span class="posted_by">By Riot MattEnth</span> </span></div>
< /code> Я хочу текст в первой строке, который в этом примере содержит (в правом правом фрагменте кода) < /p> The evolution of your League of Legends match history is now live![/code] Есть ли простой способ сделать это с моим следующим кодом? Прямо сейчас он возвращает всю строку мусора. < /P> [code]XDocument xmlFile = XDocument.Load(@"http://na.leagueoflegends.com/en/rss.xml"); var LoLdescriptions = from service in xmlFile.Descendants("item") select (string)service.Element("description"); ViewBag.descriptions = LoLdescriptions.ToArray();
...moving into View...
@ViewBag.descriptions[0] < /code> Если это не сложно, есть ли также способ получить последнюю строку? В этом случае по бунте Mattenth [/code]