Transforming XML data to HTML using XSL and Php: only printing xml tags without any formatting

前端 未结 2 1581
遥遥无期
遥遥无期 2021-01-23 03:05

I have to transform my xml output to html. I am following a tutorial at link text My code is outputting xml tags in a single line without any formatting with text value.I want

2条回答
  •  隐瞒了意图╮
    2021-01-23 03:25

    To be crossbrowser, I would use this stylesheet:

    
        
        
            
                
                    
                
            
        
        
            
  • Output:

    
    
    
    
    • message 1
      • message 2
      • message 3
        • message 4
        • message 5
          • message 6
            • message 7
            • message 8

    Render as:

    • message 1
      • message 2
      • message 3
        • message 4
        • message 5
          • message 6
            • message 7
            • message 8

    Note: HTML DOCTYPE, no namespace. Also other approach to hierarchie processing with fine grained traversal.

提交回复
热议问题