2013-03-19 80 views
0

您好下面给我使用XML文件。我想显示数据网页view.how可以在Windows Phone 7中获得网页浏览?如何使用Windows Phone 7中的Web浏览器控件从xml文件中获取html文件?

<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.”&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> 

我要使用Web浏览器控件for Windows的XML文件显示在Fullcontent标签网页浏览电话号码7.请帮我有人......,谢谢进展。

回答

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 

}); 
+0

嗨感谢您的重播,我希望你的答案,但我要绑定fullcontent dynamically.i认为你是存储在本地系统中的一个HTML文件后,你得到的资源流吗?但在这里不是这样,我会直接从XML文件。如果你知道请帮助我...,高级谢谢。 – user123 2013-03-19 11:28:22

+0

这样你可以使用任何XML文件。如果xml文件的格式正确。如果你正在寻找的东西,请更新你的问题 – 2013-03-19 13:28:04

相关问题