Sorting XML with SimpleXML/XPath?

前端 未结 3 1634
囚心锁ツ
囚心锁ツ 2020-12-07 05:41

I have some XML, say:


  
    14
  
  
    19&         


        
3条回答
  •  广开言路
    2020-12-07 06:26

    Example of sorting with XSLT

    XML file:

    
    
      
        Hill
        Phil
        100000
      
    
      
        Herbert
        Johnny
        95000
      
    
      
        Hill
        Graham
        89000
      
    
    
    

    XSLF file:

    
    
    
      
    
      
        
          
        
      
    
      
        Last:      
        First:     
        Salary:    
        Hire Date: 
        
      
    
      
    
    
    

    Source: http://www.xml.com/pub/a/2002/07/03/transform.html

    Check predicates here: http://www.w3schools.com/XPath/xpath_syntax.asp for last three nodes.

提交回复
热议问题