Closed GoogleCodeExporter closed 9 years ago
I'm unable to reproduce this; the following code shows 10 lines and all symbols
appear
correct:
#include "pugixml.hpp"
#include <stdio.h>
int main()
{
pugi::xml_document doc;
printf("%s\n", doc.load_file("map01.xml").description());
const char* string = doc.child("Map").child("MapData").child_value("IDData");
printf("Plain-text:\n%s\n\n", string);
printf("Hex:\n");
while (*string)
{
printf("%02x ", *string);
if (*string == '\n') printf("\n");
++string;
}
}
Please provide additional information:
- How do you parse the xml? (load_file, load, etc.)
- The memory view looks strange (unless you captured the screenshot in the
middle of
parsing process, not after it's finished), i.e. it's not what a fully parsed
buffer should
look like - how did you get the address that's displayed?
Please note that additional
after the null terminating symbol are expected -
each
(12 characters) is replaced by 0x0d 0x0a pair (2 characters), so each
such pair shifts the text to the left by 10 characters, so for 9 line
terminator a space
of 90 characters appears at the right end of the string. This space is not
cleared with
anything, so the original buffer contents is there.
Original comment by arseny.k...@gmail.com
on 19 Apr 2010 at 4:47
[deleted comment]
Oh sorry. The bug is in my own code. I just fix it .sorry for this bug report.
and
thank you.
Original comment by Yuki...@gmail.com
on 19 Apr 2010 at 5:30
No problem :) I'm glad everything works for you!
Original comment by arseny.k...@gmail.com
on 19 Apr 2010 at 5:35
Original issue reported on code.google.com by
Yuki...@gmail.com
on 19 Apr 2010 at 4:13Attachments: