教你如何用XML做网页,例子一个

http://hi.baidu.com/tianfan/blog/item/0925c42a8413b62dd52af14c.html

总共有三个文件
分别为index.xml
     index.xsl
     index.css
保存在同一个目录下,使用浏览器打开index.xml文件即可浏览。

 

文件一:index.xml





  
   日志首页
   index.xml
  

  
   留言板
   guestbook.xml
  

  
   站长资料
   aboutme.xml
  

  
   订阅RSS2.0
   rss2.xml
  



  经过六七个钟头的苦战,这个页子模型算是可以告一段落了,版本号定为Ver0.01,欢迎大家批评
  


  程序:天凡
  
  version:0.02
  arrbo#163.com请自行将#换成@

    
   
         ]]>
        




  标题一
  http://www.aaa..com/bbb.xml


  标题二
  http://www.aaa..com/bbb.xml




  友情链接文字一
  http://www.aaa.com

  
  友情链接文字二
  http://www.aaa.com

  
  友情链接文字三
  http://www.aaa.com



   
    继续更新
    
    分类
    
        http://www.aaa.com/aaa.xml
    点击数9    
  

  
    终于完成了0.01版的部分基本结构
    
    分类
    
         ]]>
    

        http://www.aaa.com/aaa.xml
    点击数1   


 


文件二
index.xsl





  
   天凡的小窝
   
   
  
  
  
    
     


          
         

   

   
    
   
   
     
      
       
      
      

       
      

      

      新日志列表

      
      

           
           

      
      
      

      友情链接

      
       

           
           

       
      
     
     

      

          
          

     

   
   
     
     
  



  
  

  •    
        
         
            
        
       
      




  •   本站公告
      
       
      
      
       
      


      关于本站
      
       
      
      
       
      


      
       

  •     
        
         
            
        
       
       

  •   


        
       

  •     
        
         
            
        
       
       

  •   


       
       
        

    标题:

        
    日志发表时间:日志类别:

        内容摘要:
        
        
         
            
        
       
       
       
    浏览量:

       
      


      

      

      

      
    E-mail:



    文件3
    index.css


    /*主体*/
    body{
    margin:0;
    font-size:12px;
    text-align:center;
    color:#000;
    font-family:'Lucida Grande','Lucida Sans Unicode','宋体','新宋体',arial,verdana,sans-serif;
    }
    #top{
    position:relative;
    margin-left:auto;
    margin-right:auto;
    width:760px;
    height:24px;
    }
    #menu{
    position:relative;
    margin-left:-2px;
    }
    #menu ul{
    margin:0,0,0,-2px;
    TEXT-ALIGN: center; 
    display:inline;
    }
    #menu li{
    display:block;
    width:80px;
    float:left;
    list-style-type:none;
    MARGIN: 1px;
    TEXT-ALIGN: center;
    BORDER:#000 1px solid;
    LINE-HEIGHT:20px;
    }
    #menu li a{
    display: block;
    width: 100%; 
    color: #cc33cc; 
    text-decoration: none;
    background-color:#e9fafe;
    }
    #menu li a:hover {
    background-color:#ffffff;
    }
    #main{
    width:760px;
    position:relative;
    text-align:center;
    margin-left:auto;
    margin-right:auto;
    margin-top:0px;

    border:1px solid #000;
    display:table;
    }
    #mainleft{
    position:relative;
    text-align:left;
    float:left;
    width:200px;
    margin:4px;
    border:1px dotted #999;
    }
    .bloglist{
    width:500px;
    list-style-type:none;
    MARGIN: 4px;
    PADDING:2px;
    TEXT-ALIGN: left;
    BORDER:#999 1px dotted;
    LINE-HEIGHT:20px;}
    #logoarea{
    height:100px;
    width:760px;
    border:1px solid #000;
    position:relative;
    margin-left:auto;
    margin-right:auto;
    background:url("images/logo.jpg") #fff no-repeat;
    }
    .lefttitle{
    position:relative;
    height:18px;
    line-height:18px;
    display:block;
    font-size:13px;
    text-align:center;
    font-weight:500;
    background:#001A7D;
    color:#fff;
    }
    .left2{
    text-indent: 2em;
    background:#D5DDFB;
    line-height:18px;
    }
    .listul{
    margin-top:-14px;
    margin-left:-40px;

    }
    .listul li{
    width:197px;
    height:22px;
    list-style-type:none;
    TEXT-ALIGN: left;
    LINE-HEIGHT:20px;
    }
    .listul li a{
    display: block;
    width: 100%;
    color: #cc33cc; 
    text-decoration: none;
    text-indent:1em;
    background-color:#fff;
    }
    .listul li a:hover {
    border:1px solid #999;
    }
    #bulletintime
    {
    text-align:right;
    background:#D5DDFB;
    }
    #bottom{
    clear:both;
    margin:10px;


    你可能感兴趣的:(web,xml)