| Back to logs list  
  
 134506 2006 年 09 月 28 日 08:47 Reading (loading. ..) Comments (0) Category: Personal Diary  
 contents . xml  
   
  main.aspx? name = hello   
   
   
  Resolve a problem   
  main.aspx? name = test   
   
  
 This is a very simple xml file, its role is to display a list of news.  
 hello.xml  
  test news   
  feiying   
   
  
 The firet test   
   
  
 This file is used to display news content, which means we all understand at a glance, I do not say much here. 
 The following list shows for everyone to read the news page.  
 news.aspx  
     
   
   
   
   
   
 this page and complete by xslt from xml into html files, so I got a better understanding of the xslt.  
 Here is news content displayed page:  
 main.aspx  
     
   
   
   
  
   
  
 this function and above, I do not say here.  
 Finally, we look at the most responsible one page, the page's role is to create a new xml data. 
 manage.aspx  
   
  public void Button1_Click (object sender, System.EventArgs e)  
 { 
 / / determine the file exists  
 if (File.Exists (Server.MapPath (TextBox1.Text + )  
 { 
 Response.Write (> { 
 * mlNode currNode;  
 XmlDocument xmldoc = new XmlDocument ();  
 xmldoc.Load (Server.MapPath (>   
 main.aspx? name =  
 currNode = xmldoc.DocumentElement;  
 currNode.InsertAfter (docFrag, currNode.LastChild);  
 / / save the output to a file  
 xmldoc.Save (Server.MapPath (;));  
 / / replace the TextBox5 meet the xml file in the format of the content.  
 string xmlfile = TextBox5.Text.Replace (br> xmlfile = xmlfile.Replace ();  
 xmlfile = xmlfile.Replace (paragraph>  
 XmlDocument doc = new XmlDocument ();  
 doc.LoadXml ( 
    
 TextBox4.Text  
  
   the article! )  
 {}  
   
   
   
   
   Summary:  
   
  name = Button2 runat =   
  
  
 <input type = =  
 LEFT: 268px; POSITION: absolute; TOP: 430px 
		
	
		
		
		
		
		
	
	 |