如何设置一个xml文件中节点的值?
我在linux下使用libxml2库创建了一个xmldoc,并建立了一些节点格式如下:
<bizRoot>
− <head>
<senderCode> </senderCode>
<gateCode> </gateCode>
<msgNo> </msgNo>
<msgType> </msgType>
<priority> </priority>
</head>
− <body>
− <news>
<opt> </opt>
− <shares>
− <share>
<id> </id>
<title> </title>
<content> </content>
<date> </date>
</share>
</shares>
− <subnewses>
− <subnews>
<id> </id>
<sparkName> </sparkName>
<title> </title>
<content> </content>
<date> </date>
</subnews>
</subnewses>
</news>
</body>
</bizRoot>
如果想给其中某一个节点赋值,比如 <id> </id>中填20,请问该使用什么库函数,或者怎么做?
由于我不熟悉libxml2库,请各位给予帮助!!