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
0
votes
1 answer

Creating a Folder System in a p:tree

I need select a folder and list its files. But I can't give the user, access to the fileSystem, so I need to list the subfolders from a specific path (/u01/SNV). I'm trying to use a for that. But I can't seem to manage populating the…
0
votes
1 answer

Using return value to pass into constructor doesn't work

I'm using boost::property_tree::ptree and parse_ini to read an ini file. Using ptree::iterator I'm getting the ini sections and want to use them to create another object. I have an object called First that gets First(int& i, string& str) So I'm…
0
votes
2 answers

How to read enum from json in C++ using boost?

How to read an enum from json using read_json from boost? I know that I cand read an int and then compare it, but I would like to insert a string and convert it to the enum. Is this possible, or I shall create a function that does this (receive the…
sop
  • 3,445
  • 8
  • 41
  • 84
0
votes
2 answers

How to copy subtree from Boost.PropertyTree

I have some boost::property_tree::ptree. I need tree with removing some elements with certain tag name. For example, xml for source ptree is the following:
Loom
  • 9,768
  • 22
  • 60
  • 112
0
votes
1 answer

Extend boost property tree get for own types

How do I extend boost property tree to support my own types? e.g. I want to write boost::property_tree::basic_ptree xml; ... xml.get("level"), xml.get("accuracy"), xml.get("sauce_pan"), ... And then I…
Cookie
  • 12,004
  • 13
  • 54
  • 83
0
votes
1 answer

Boost Property Tree: read value into char *

I'm reading various data from a ptree. One of the fields is declared as char * segmentCode; So I'm reading into the segmentCode this way: segmentCode = dataTree.get("segmentCode"); However, it throws an Access Violation. Where did I go…
Michał Leon
  • 2,108
  • 1
  • 15
  • 15
0
votes
1 answer

Acess boost ptree across multiple threads

I'd like to make a system, that loads options out of an XML-file into a ptree and acess this ptree across multiple threads. Sofar, i have mad a simple class, that is accessible to every thread, that contains the methods put(id) and…
user2741831
  • 2,120
  • 2
  • 22
  • 43
0
votes
1 answer

using boost::property_tree, is it possible to create a xml attribute with a '.' in the name?

I'm using boost 1.51 and have something like this: boost::property_tree::ptree some_tree; some_tree.put("hello.world..foo.bar","4711"); I was hoping to get But I only get
Magnus
  • 643
  • 8
  • 15
0
votes
1 answer

How to initialize Boost.PropertyTree with Boost.Assign

There is a sample of filling boost::property_tree::ptree boost::property_tree::ptree pt; pt.put("one", "value1"); pt.put("one.two", "value2"); pt.put("one.three", "value3"); How to extend Boost.Assign library that it fits for initializing…
Loom
  • 9,768
  • 22
  • 60
  • 112
0
votes
1 answer

map/set iterator not dereferencable

Greeting I use boost ptree to get some information also put in some time. typedef ptree MInfo; In my application i use following style to .put or .get information into my MInfo. a_info.put(PathTree(SStatus)(fwDevice).str(),…
M.H.
  • 223
  • 3
  • 10
  • 23
0
votes
1 answer

Using Boost Property Tree to replace DOM Parser

I need to write a XML Parser using Boost Property tree which can replace an existing MSXML DOM Parser. Basically my code should return the list of child nodes, number of child nodes etc. Can this be achieved using Property Tree? Eg.…
Techiegirl
  • 119
  • 1
  • 9
0
votes
1 answer

boost json serialization and message_queue segfault

i'm making some test with boost interprocess and ptree structure, i have a segfault when i try to read the message sent(or when i try to parse it in json). i'm using boost1.49 on debian linux. i'm serializing it in json for later uses, and because i…
0
votes
2 answers

What is the Meaning of a "note" from G++ which is NOT Attached to an Error or Warning

While compiling some code, I received the following strange message from g++ 4.3.4: ...include/boost/property_tree/stream_translator.hpp: In member function 'typename boost::enable_if,…
Trebor Rude
  • 1,904
  • 1
  • 21
  • 31
0
votes
0 answers

Add data to a boost property_tree

I have a simple tree structure stored in XML and use boost::property_tree::ptree to read and extract the information. I then recreate the tree using std::maps so that I can store data in the leaves. This works well and I like the separation of the…
Ant
  • 1,668
  • 2
  • 18
  • 35
0
votes
2 answers

input file format for my code using boost::property_tree

I'm considering creating an input/log file for my code for two main purposes. 1) Be able to log all key parameters that the code was run with so that I can reproduce the same results in the future if I needed to. 2) Be able to start/resume the code…
mmirzadeh
  • 6,893
  • 8
  • 36
  • 47
1 2 3
23
24