More precisely, can child node's name be ever the same as any of the 开发者_运维百科parent node attribute names?
Example:
<categories>
<category id="10" **name**="someName"> -parent node [contains 'name' attribute']
<**name** lang="eng">Drill</name> -child node [named: 'name']
</category>
</categories>
Yes, having attributes and elements with the same name are allowed by XML, although arguably not a great practice.
精彩评论