How are attributes parsed in Boost.PropertyTree?

前端 未结 2 486
故里飘歌
故里飘歌 2021-02-05 06:06

Say I have this XML format:


   
      dostuff();
   
         


        
2条回答
  •  不知归路
    2021-02-05 06:30

    If your problem is to get attributes:

    The attributes of an XML element are stored in the subkey . There is one child node per attribute in the attribute node. Existence of the node is not guaranteed or necessary when there are no attributes.

    From the doc http://www.boost.org/doc/libs/1_44_0/doc/html/boost_propertytree/parsers.html#boost_propertytree.parsers.xml_parser

    So just get them from the key in the path.

提交回复
热议问题