Boost logo

Boost Users :

Subject: [Boost-users] [property_tree] utf8 and others
From: Sergei Politov (spolitov_at_[hidden])
Date: 2009-12-02 04:33:09


Hi,

  I'm playing with new boost library property_tree.
  And I have several questions regarding it.
  1) Suppose there is xml file with utf8 encoding.
  What is the best way to populate it into wptree?
  2) How can I save wptree into xml file with utf8 encoding. Unfortunately
write_xml requires wostream.
  3) Is there something like map operator[]? I.e. I need the following
behavior:
  wptree & something(some_path)
  {
    boost::optional<wptree &> child = my_tree.get_child(some_path);
    if(child)
      return child.get();
    else
      return my_tree.put_child(some_path);
  }

Best Regards,
  Sergei



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net