0

こんにちは、以下に示す xml ファイルを使用しています。データの Web ビューを表示したいのですが、Windows Phone 7 で Web ビューを取得するにはどうすればよいですか?

<Articles>
   <articles title="photos">
       <Description>
          Hottie Mallika Sherawat speaks about the men whom she’s over the moon about
       </Description>
       <Fullcontent>
          <style> img {padding:2px;} </style><p> <img alt="Mallika Sherawat" pimcore_disable_thumbnail="true" pimcore_id="5853" pimcore_type="asset" src="http://dev2.mercuryminds.com/bolly/feb2013/bolly---mallika-sherawat-s-upcoming-movie-dirty-politics/90_mallika-sherawat_bolly.jpg" style="width: 500px; height: 370px; float: left;" /></p>
          <p> Actress Mallika Sherawat is all set to begin shooting for&nbsp;<em>Dirty Politics</em>&nbsp;where she plays Bhanwari Devi, a nurse whose murder hit the headlines last year. Meanwhile, she gets talking on&nbsp;Hollywood where she has not really had any meaty roles. She does not seem to care though. “It’s not important to play full length roles. Being recognised for playing whatever I did makes me feel proud.”&amp;nbsp;</p>
       </Fullcontent>
     </articles>
     <articles> 
        <Description> 
           <p> Legendary singer <strong>Asha Bhosle</strong> has added yet another feather to her cap with her acting debut in Mai. She plays the lead role of a woman abandoned by her son. 
        </Description> 
        <Fullcontent> 
          <div id="container" class="cf"> 
           <link rel="stylesheet" href="http://dev2.mercuryminds.com/imageslider/app/css/demo.css" type="text/css" media="screen" />
           <link rel="stylesheet" href="http://dev2.mercuryminds.com/imageslider/app/css/flexslider.css" type="text/css" media="screen" />
           <div id="main" role="main"> <section class="slider"> 
           <div class="flexslider"> 
           <ul class="slides">
             <li>Sonam Kapoor<img src="http://dev2.mercuryminds.com/website/var/tmp/thumb_5814_1_sonam-kapoor_01feb2013__appfeed.jpeg" alt="Sonam Kapoor"/></li> 
             <li>Sridevi<img src="http://dev2.mercuryminds.com/website/var/tmp/thumb_5815_2_sridevi_01feb2013__appfeed.jpeg" alt="Sridevi"/></li> 
        </Fullcontent> 
     </articles> 
 </Articles>

Windows Phone 7 の Web ブラウザー コントロールを使用して、xml ファイルから Fullcontent タグの Web ビューを表示したいと考えています。

4

1 に答える 1

0

おそらくこれを出発点として使用できます

http://msdn.microsoft.com/en-us/library/ff402601(v=VS.92).aspx

http://blogs.msdn.com/b/dohollan/archive/2010/08/25/adventures-with-the-windows-phone-7-webbrowser-control.aspx

XMLからHTML文字列を作成した後、実行できます

webBrowser1.NavigateToString(html); 

これは単なる基本的な XML ファイルであるため、XML ファイルを処理するには、次のようなことができます。

    var xDoc = XDocument.parse("[YOUR XML STRING]");
    var articles = xDoc.Root.Elements("articles").select(e=>new {
     desc = e.Element("Description").Value,
     fullContent = e.Element("FullContent").Value

});
于 2013-03-19T10:34:27.493 に答える