how to add comments to boost property tree while export in xml file
Hi All, I have read and store my complete configuration file in to boost property tree, now I want to export it to a xml file which i can do via function write_xml(). I wanted to add some comments inside my exported xml file. Please help me to know, how to add comments inside xml file while exporting data from boost property tree. Thanks & Regards Neelam
according to the doc: https://www.boost.org/doc/libs/1_67_0/doc/html/property_tree/parsers.html#pr... *XML comments are stored in nodes named <xmlcomment>, unless comment ignoring is enabled via the flags.* so you probably have to do something like: Pt.put<String> ("Root.<xmlcomment>", "some comment"); I think that is the way to add comments. 2018-05-01 0:47 GMT-04:00 neelam baliyan via Boost-users < boost-users@lists.boost.org>:
Hi All,
I have read and store my complete configuration file in to boost property tree, now I want to export it to a xml file which i can do via function write_xml().
I wanted to add some comments inside my exported xml file.
Please help me to know, how to add comments inside xml file while exporting data from boost property tree.
Thanks & Regards Neelam
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Daniel «Il faut imaginer Sisyphe heureux» Albert Camus
Hi Daniel,
Thanks for you reply.
i tried to apply <xmlcomment> in my section of code, but it is only putting
comment inside a section.
i need to give comments on each and every node .
Please see the snapshot code and generated xml file, its only setting xml
comments of each section like section pb-atpcu-r4, but i need to set xml
comments for each node.
*my objective* to set comments for
according to the doc:
https://www.boost.org/doc/libs/1_67_0/doc/html/property_ tree/parsers.html#property_tree.parsers.xml_parser
*XML comments are stored in nodes named <xmlcomment>, unless comment ignoring is enabled via the flags.* so you probably have to do something like:
Pt.put<String> ("Root.<xmlcomment>", "some comment");
I think that is the way to add comments.
2018-05-01 0:47 GMT-04:00 neelam baliyan via Boost-users < boost-users@lists.boost.org>:
Hi All,
I have read and store my complete configuration file in to boost property tree, now I want to export it to a xml file which i can do via function write_xml().
I wanted to add some comments inside my exported xml file.
Please help me to know, how to add comments inside xml file while exporting data from boost property tree.
Thanks & Regards Neelam
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Daniel «Il faut imaginer Sisyphe heureux» Albert Camus
Hi,
i have realized the snapshot is not visible in below mail.
*my objective* to set comments for each parameter name like
Hi Daniel,
Thanks for you reply.
i tried to apply <xmlcomment> in my section of code, but it is only putting comment inside a section. i need to give comments on each and every node . Please see the snapshot code and generated xml file, its only setting xml comments of each section like section pb-atpcu-r4, but i need to set xml comments for each node. *my objective* to set comments for
, clock_masters and all given below. Please see if you can help me in that. Thanks & Regards Neelam +91-9871541627
On Thu, May 3, 2018 at 6:16 AM, Daniel Anderson
wrote: according to the doc:
https://www.boost.org/doc/libs/1_67_0/doc/html/property_tree /parsers.html#property_tree.parsers.xml_parser
*XML comments are stored in nodes named <xmlcomment>, unless comment ignoring is enabled via the flags.* so you probably have to do something like:
Pt.put<String> ("Root.<xmlcomment>", "some comment");
I think that is the way to add comments.
2018-05-01 0:47 GMT-04:00 neelam baliyan via Boost-users < boost-users@lists.boost.org>:
Hi All,
I have read and store my complete configuration file in to boost property tree, now I want to export it to a xml file which i can do via function write_xml().
I wanted to add some comments inside my exported xml file.
Please help me to know, how to add comments inside xml file while exporting data from boost property tree.
Thanks & Regards Neelam
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Daniel «Il faut imaginer Sisyphe heureux» Albert Camus
participants (2)
-
Daniel Anderson
-
neelam baliyan