XSLT Transform doesn't work until I remove root node

后端 未结 1 1046
死守一世寂寞
死守一世寂寞 2020-11-21 06:53

I\'m trying to extract the headline from the below XML from the Met Office web service using XSLT, however my XSLT select returns blank.

SOURCE:

<         


        
1条回答
  •  耶瑟儿~
    2020-11-21 07:21

    The problem: your XML puts its elements in a namespace.

    Solution: declare the same namespace in your stylesheet, assign it a prefix and use that prefix to address the elements in the source XML:

    XSLT 1.0

    
    
      
      
       
      
      
    
    
    

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