讲述动态生成RSS文件的方法。动态生成RSS文件也基本有两种方法,一种是用字符串累加的方法,另一种是使用xml文档生成的方法。字符串累加的方法也比较简单,我也就不多说了,这里着重说一下生成XmlDocument的方法,包括各种节点的创建,属性的创建等。阅读全文>
发表于 @ 2007年03月20日 01:07:00|评论(loading...)|收藏
方法一:xmldoc = new XmlDocument ( ) ;//加入XML的声明段落xmlnode = xmldoc.CreateNode ( XmlNodeType.XmlDeclaration , "", "") ;xmldoc.AppendChild ( xmlnode ) ;//加入一个根元素xmlelem = xmldoc.CreateElement ( "", "Employees" , "") ;xmldoc.AppendChild ( xmlelem ) ;//加入另外一个元素for(int i=1;i.阅读全文>
发表于 @ 2007年03月20日 00:58:00|评论(loading...)|收藏