Get child Node of another Node, given node name

前端 未结 4 1275
再見小時候
再見小時候 2021-02-11 15:21

I have an XML like this:


  
    1
    Declaration of Human Rights         


        
4条回答
  •  醉酒成梦
    2021-02-11 16:01

    If the Node is not just any node, but actually an Element (it could also be e.g. an attribute or a text node), you can cast it to Element and use getElementsByTagName.

提交回复
热议问题