
There is a function encode_char_entities() in boost/property_tree/detail/xml_parser_utils.hpp; is that safe to use from other Boost libraries? Boost.Graph's GraphML writer currently generates its own XML, and I just changed it to escape strings using that function. Should that be moved to someplace more public? -- Jeremiah Willcock

Jeremiah Willcock wrote:
There is a function encode_char_entities() in boost/property_tree/detail/xml_parser_utils.hpp; is that safe to use from other Boost libraries? Boost.Graph's GraphML writer currently generates its own XML, and I just changed it to escape strings using that function. Should that be moved to someplace more public?
By the way, it will be nice to grab all escaping algorithms to string_algo... XML escaping is the first candidate.

Jeremiah Willcock wrote:
There is a function encode_char_entities() in boost/property_tree/detail/xml_parser_utils.hpp; is that safe to use from other Boost libraries? Definitely not. property_tree isn't even merged to release right now, and I'm doing a major overhaul, so it's in flux, too. (But on a branch, so you won't notice on trunk until I want to merge.)
So, this function should definitely get moved somewhere else if you want to use it. Sebastian

On Sun, 24 May 2009, Sebastian Redl wrote:
Jeremiah Willcock wrote:
There is a function encode_char_entities() in boost/property_tree/detail/xml_parser_utils.hpp; is that safe to use from other Boost libraries? Definitely not. property_tree isn't even merged to release right now, and I'm doing a major overhaul, so it's in flux, too. (But on a branch, so you won't notice on trunk until I want to merge.)
So, this function should definitely get moved somewhere else if you want to use it.
What would you recommend I do? Copy-and-paste that file and rename the function to something internal? -- Jeremiah Willcock

On Sun, 24 May 2009 09:35:58 -0400 (EDT), Jeremiah Willcock <jewillco@osl.iu.edu> wrote:
On Sun, 24 May 2009, Sebastian Redl wrote:
Jeremiah Willcock wrote:
There is a function encode_char_entities() in boost/property_tree/detail/xml_parser_utils.hpp; is that safe to use from other Boost libraries? Definitely not. property_tree isn't even merged to release right now, and I'm doing a major overhaul, so it's in flux, too. (But on a branch, so you won't notice on trunk until I want to merge.)
So, this function should definitely get moved somewhere else if you want to use it.
What would you recommend I do? Copy-and-paste that file and rename the function to something internal?
I think you should ask the StringAlgo maintainer if he wants it. If not, copy&paste it to something internal. Sebastian
participants (3)
-
Dmitry Vinogradov
-
Jeremiah Willcock
-
Sebastian Redl