How do i remove all linebreaks?

后端 未结 2 1384
情深已故
情深已故 2020-12-15 22:55

I have something like this:




   
      

t

2条回答
  •  暖寄归人
    2020-12-15 23:11

    The following transformation:

    
    
    
    
      
    
    
    
      
        
      
    
      
    
    
    
    

    when applied against this XML document

    
    
    
    
        
            

    txt Y

    produces the wanted result:

    txt A
    txt X
    txt Y
    txt B

    Do note the use of the standard XPath function normalize-space(), which strips off all leading and trailing spaces and replaces every sequence of other spaces with just one space.

提交回复
热议问题