Hi,
i have realized the snapshot is not visible in below mail.
my objective to set comments for each parameter name like <board_pos>, clock_masters and all given below.
Please find the code snippet.
while (curr1 != end1) // iterate second level map
{
// LOG("Section name [%s] : Parameter name and value are [%s] -->
// [%s]\n",curr->second.c_str(),curr1->first.c_str(),curr1->second.c_str());
ptParamVal.put("<xmlcomment>", "some comment");
ptParamVal.put((curr1->first).c_str(), (curr1->second).c_str());
curr1++;
}
-----------------------------------------------------------------------------------------------------------------------------------
//xml file generated is given below.
-----------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<profibusunits>
<pb-atpcu-r4>
<!--some comment-->
<board_pos>2</board_pos>
<clock_master>0</clock_master>
<host>192.168.2.10</host>
<hw_address>2</hw_address>
<local_spl_port>10045</local_spl_port>
<name>atpcu.r4</name>
<nidstm>254</nidstm>
<port>0</port>
<profibus>0</profibus>
<remote_spl_port>10045</remote_spl_port>
<rspl_priority>3</rspl_priority>
<rspl_server>RSPLServerEth_5_2_3</rspl_server>
</pb-atpcu-r4>
<pb-jru>
<!--some comment-->
<board_pos>3</board_pos>
<clock_master>0</clock_master>
<host>localhost</host>
<hw_address>3</hw_address>
<local_spl_port>0</local_spl_port>
<name>jru</name>
<nidstm>254</nidstm>
<port>5502</port>
<profibus>0</profibus>
<remote_spl_port>0</remote_spl_port>
<rspl_priority>3</rspl_priority>
<rspl_server>RSPLServerEth_5_2_3</rspl_server>
</pb-jru>