Split one XML file to multiple XML File with XSLT

前端 未结 1 1241
生来不讨喜
生来不讨喜 2021-01-29 05:43

I have this XML in one file below



   
    cont         


        
1条回答
  •  梦如初夏
    2021-01-29 05:56

    With XSL 2.0:

    
        
        
            
                
                    
                        
                    
                
            
        
    
    

    I tested this using Saxon, which supports XSLT 2.0, using the command below:

    java -jar saxon9.jar -xsl:transform.xsl -s:input.xml
    

    This command generates three files: file1.xml, file2.xml and file3.xml.

    $ cat file1.xml
    
    
        
        content file 1
      
    
    

    0 讨论(0)
提交回复
热议问题