For example I have boost property tree of following structure (created by reading stream with xml or in different way):
<A>
<B>
<C></C>
</B>
</A>
How to rename in existing tree element B to new element with new key: N. So invoking write_xml of this fixed tree should give new xml structure:
<A>
<N>
<C></C>
</N>
</A>
Please present code if it is possible or explain why it is not. Remark: attaching subtree under C to newly generated root is also acceptable but direct renaming in priority.