用asp.net和xml做的新闻更新系统(1)

读了很多关于.net的文章,也看了许多关于xml的资料,我已经深深的被他们的魅力所吸引。在网上的论坛中,大家对于.net的讨论更加火热一些,而我们的同事告诉我,其实xml是一个比.net更好的东西。包括其中的xslt,其未来要远远比.net要好。
其实争论谁好谁坏本身是没有多大意思的,因为.net本身已经和xml紧密的结合在一起了。这里我就用xml代替数据,写一个新闻发布系统,希望能够起到抛砖引玉的作用,使更多的人能够了解这些最新的技术。
下面介绍这几个文件。

 1<p>contents.xml   
 2<?xml version="1.0" encoding="GB2312"?>
 3<topiclist type="AspCool News">
 4<topic>
 5<title>aspcool news!</title>
 6<href>main.aspx?name=hello</href>
 7</topic>
 8<topic>
 9<title>Resolve a problem</title>
10<href>main.aspx?name=test</href>
11</topic>
12</topiclist> </p>
1<p>这是一个很简单的xml文件,它的作用是用来显示新闻的列表。 </p>
1<p>hello.xml </p>
1<p><?xml version="1.0" encoding="GB2312"?>
2<document>
3<title>aspcool news!</title>
4<abstract>test news</abstract>
5<author>feiying</author>
6<content>
7<paragraph>The firet test</paragraph>
8</content>
9</document> </p>
1<p></p>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus