스팬 클래스의 텍스트를 액세스 할 수 있고 스팬 클래스 외부의 정보도 얻을 수 있기를 원합니다. 예를 들어 내가 지금 무엇을Linq가 XDoc을 쿼리하는 XML
다음<item><title>Operations Applications - MDI Diagnostics</title><link>http://confidential-link.com</link>
<description><![CDATA[<div style="margin-top:5px"><link rel="stylesheet" type="text/css" href="confidential" />
<span class="srch-Icon"><a href="confidential" title="Operations Applications - MDI Diagnostics">
<img src="confidential" alt="Web Page" border="0" /></a></span>
<span class="psrch-Description"> THE INFORMATION I WANT</span>
<p class="srch-Metadata"><span class="srch-URL">
<a href="confidential" title="Operations Applications - MDI Diagnostics">confidential link</a>
-
66KB
</span></p></div>]]></description>
<author>Bob Smith
</author><pubDate>Mon, 10 Mar 2014 18:53:49 GMT</pubDate><search:dotfileextension>.ASPX</search:dotfileextension><search:size>68076</search:size>
<search:hithighlightedsummary> SIMILAR TO THE INFORMATION I WANT, COULD BE OPTION 2 </search:hithighlightedsummary>
</item>
입니다 :
여기는 XML 문서 정보의 내 샘플입니다
예상대로 "설명"을 반환 var feeds = from feed in xdoc.Descendants("item")
select new RSSS
{
Site = "TOPS",
URL = url,
Title = feed.Element("title").Value,
Link = feed.Element("link").Value,
Description = feed.Element("description").Value
};
:
를<div style="margin-top:5px"><link rel="stylesheet" type="text/css" href="confidential" />
<span class="srch-Icon"><a href="confidential" title="Operations Applications - MDI Diagnostics">
<img src="confidential" alt="Web Page" border="0" /></a></span>
<span class="psrch-Description"> THE INFORMATION I WANT</span>
<p class="srch-Metadata"><span class="srch-URL">
<a href="confidential" title="Operations Applications - MDI Diagnostics">confidential link</a>
-
66KB
</span></p></div>
그렇다면 "span class = psrch-Description"사이의 정보에 액세스하려면 어떻게해야합니까? 링크와 제목 등을 액세스 할 수 있습니까?
**
나는이 날 다른 정보를 얻을 수 없습니다var feeds = from feed in xDoc.Descendants("Show") where (string)feed.Attribute("Code") == "456" select new { EventDate = feed.Attribute("Date").Value };
처럼 뭔가를 찾고 있지 않다 때문입니다. <Description>
는 XML을 준수 HTML을 포함
동일한 RSS 모델에 설명을 추가 할 수 있습니까? – CSintern