Difference between: child::node() and child::*

后端 未结 2 2121
梦如初夏
梦如初夏 2020-12-24 07:25

I just wrote an XSLT that did not work at first.

I had to rename all children of to :



        
2条回答
  •  一个人的身影
    2020-12-24 08:06

    To expand on lwburk's answer, if your XML looks like this:

    
      
      
      
    
    

    Then the A element has 7 child nodes; three of them are elements, four are text nodes. The expression child::node() matches all 7, whereas child::* only matches the elements.

提交回复
热议问题