antchfx / xmlquery

xmlquery is Golang XPath package for XML query.
https://github.com/antchfx/xpath
MIT License
444 stars 89 forks source link

The function doc for AddSibling #53

Open suntong opened 3 years ago

suntong commented 3 years ago

The function doc for AddSibling says:

AddSibling adds a new node 'n' as a sibling of a given node 'sibling'. Note it is not necessarily true that the new node 'n' would be added immediately after 'sibling'. If 'sibling' isn't the last child of its parent, then the new node 'n' will be added at the end of the sibling chain of their parent.

IIUC, that can be simplified as,

AddSibling adds a new node 'n' as a sibling of a given node 'sibling'. The new node 'n' will always be added at the end of the sibling chain of their parent.

Is my understanding correct? thx