0

I'm converting html into xml, changing tag names and other stuff, but i have problems with preserving whitespaces. This is how I'm loading file:

xml_parse_result check = doc.load_file(sourcePath.c_str(), (parse_default | parse_ws_pcdata), encoding_auto);

But if I use it that way, also '\n' and '\r' are preserved. I can't understant why, because parse_escapes and parse_eol are on by default.

parse_ws_pcdata_single, doesn't fit me, because whitespaces I wan't to preserve have sibling.

Horokey
  • 1
  • 1
  • Can you give an example of an input and output file that you're getting right now without changing the content? – zeuxcg Aug 06 '14 at 14:35
  • for example, input: some text some text 2 some text3 When parsing, i'm getting this thing: root: parent first_child: \n next_sibling: tag It saves single whitespace, but also assuming \n as child node. I was trying to preserve whitespace and not getting \n or \r But I've already solved the poblem by pre-parsing file, deleting all unwanted characters. I believe there is a better solution. – Horokey Aug 07 '14 at 08:28

0 Answers0