Questions tagged [boost-propertytree]

The Boost PropertyTree library provides a data structure that stores an arbitrarily deeply nested tree of values, indexed at each level by some key. It serializes and emulates XML, JSON and INI file structures.

The Boost PropertyTree library provides a data structure that stores an arbitrarily deeply nested tree of values, indexed at each level by some key. It serializes and emulates XML, JSON and INI file structures.

Note: Boost.PropertyTree is not a generic XML parser. It is not intended to be used as a fast-and-dirty way to load arbitrary XML files into memory. It's XML serialization capabilities are for serialization. It is intended to read the XML that it has written.

Please stop using Boost.PropertyTree as a generic XML parser.

354 questions
1
vote
1 answer

Parsing xml using Boost c++ for nested tags

I am trying to parse an xml file using boost which is of the following structure: 1 10 11
coder0007
  • 161
  • 2
  • 11
1
vote
0 answers

Operator lookup in boost::property_tree

Having a custom type in a namespace and the streaming-operator in a parent namespace, the compiler fails to find the operator in a boost::property_tree::ptree::get() operation. Example: #include namespace NS1 { …
1
vote
1 answer

boost::property_tree change order of elements

I use boost property tree to write some nice xml files and everything works fine... but I would like to somehow make sure that one specific block is at the start of the xml file. This block is a general block about the software and some general…
user7431005
  • 3,899
  • 4
  • 22
  • 49
1
vote
1 answer

Boost Property ptree: boost write_xml adding unicode 0x0 character in child element in xml file

I am using boost write_xml function to create xml. I am able to create successful xml using Boost. But It is adding extra unicode 0x0 character at end of xml child element. code snippet: boost::property_tree::write_xml(oss, pt,…
Sandip Patidar
  • 157
  • 1
  • 14
1
vote
1 answer

Boost property tree: Remove a node using pointers to the node and its parent node

I want to remove a node from a ptree which is based on xml:
M.Kh.
  • 67
  • 1
  • 7
1
vote
1 answer

boost property tree: How to delete the specified parameters of the node

a b c I want to delete the id = 2 node. I use boost::property_tree::ptree…
Y.Rui
  • 21
  • 6
1
vote
1 answer

Setting up boost property_tree for a custom path type

I need to use boost::property_tree in my program. Right now I'm having hard time trying to figure out how to use it with a custom path type. The path type I want to have is Framework::CommonClientServer::InterfacePathChain_t which is typedef'ed…
Egor Chubarov
  • 208
  • 1
  • 13
1
vote
1 answer

C++: boost ptree relative key

In C++ using ptree from boost, I need to find the relative key to access a.b.c2.e1 from a.b. This key is c2.e1. How can I write a function which finds this relative key? #include #include #include…
ar2015
  • 5,558
  • 8
  • 53
  • 110
1
vote
3 answers

C++: boost ptree remove children: no matching function

In an attempt to remove children of a boost property tree, I use a direct node in erase function which lead to error: no matching function for call to ‘boost::property_tree::basic_ptree,…
ar2015
  • 5,558
  • 8
  • 53
  • 110
1
vote
1 answer

Using boost::hash with boost::property_tree?

I am attempting to generate a hash value for an object that contains a boost::property_tree (boost::property_tree::basic_ptree, std::basic_string >). Searching through the boost header files for property tree I cannot…
Carter12s
  • 88
  • 1
  • 6
1
vote
0 answers

Refresh the design of a control with nested properties. VB.Net

I was trying to make a nested property redrawing the base (a control) of his parent property. Here is what I know: If we use the Refresh() command supposedly it should work for what I want. Just like below. Private Var_MyProperties_Parent As…
1
vote
1 answer

How to delete the last xml node and its child with boost lib?

I want to remove a node from an XML file. XML string looks like: A1B1C1 A2B2C2 ... …
1
vote
2 answers

Does Boost Property Tree have methods for defining rules for the data to be parsed?

I have a project that will be using a single JSON file in order to describe the inner contents of the directory it is contained within. The Boost Property Tree library appears to be the best choice for a JSON parsing library. However, this JSON file…
Jared
  • 4,240
  • 4
  • 22
  • 27
1
vote
2 answers

Accessing Boolean values by parsing JSON file using boost property tree

Below are the steps I followed to fetch values from a JSON file: { "Bases":[ { "mnemonic":"ADIS.LA.01", "relay":true }, { "mnemonic":"ALEX.LA.01", "relay":true } ] } I am failing to fetch the boolean…
LearningCpp
  • 972
  • 12
  • 29
1
vote
1 answer

how to make boost property tree print all subtrees and then end parent tree

In the code below iam trying to traverse through a deeply nested map and i am not sure how property tree is interpreting the data. It is actually printing all the parent tree data and then starts printing child tree #include…
LearningCpp
  • 972
  • 12
  • 29