Reputation: 73
<top>
<name>hanhao</name>
<age>18</age>
<!--
node name : name
node value : hanhao
node name : age
node value : 18
-->
</top>
e.g. I want to delete the "top" node,at the same time ,remain its subnode "name" and "value" and remain the comment.
I try to do this by saving its subnode and command but failed because I don't know how to let rapidxml distinguish & save a comment
So i faced two ways to solve it.
plan A : use a function who can directly delete a node without its subnode
plan B : use a function who can distinguish & save a comment so that I can delete the whole node and rebuild it without "top" node
I am searching for a long time on net. But no use. If you know how to make it work , or you have a nice plan C , please help me.
Upvotes: 1
Views: 471