开发者

Displaying an XML DataSource

I have an xml data file and I want to populate a listview in asp.net with this file. Can you show me how to generate an xslt and make a xml data file for this ?

Thanks

<Projects>
  <Project Name="" Category="" Subcategory="">
    <Subheader></Subheader>
    <Thumbnail></Thumbnail>
    <CreateDate></CreateDate>
    <Explanation></Explanation>
    <PdfFile></PdfFile>
    <WordFile>&l开发者_JAVA百科t;/WordFile>
    <Subheader></Subheader>
    <SlideShow>
      <Image></Image>
<Image></Image>
    </SlideShow>
  </Project>
</Projects>


To get started with transforming your XML with XSLT, there is a great tutorial here.

ASP.NET requires that you have some knowledge of that. Once you get that worked out, use the ASP.NET server control which simply joins the two files together and renders the HTML output. I recommend that you put the style tag in your XML file to start as you work out your XML. This is that syntax:

<?xml-stylesheet type="text/xsl" href="somename.xsl"?>

Once you have that correct, add both files to the XML control.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜