Or maybe you can advise smth else?
If it is binary data what do you then need the strlen for? Whould it not
be more usefull to have foot print in memory? Eg. use sizeof the returned
pointer.
--
Hilsen/Regards
Michael Rasmussen
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917
But in any case sizeof(pointer) will return me size of pointer, but not
size of data that this pointer points on. Sorry for many "point" =).
I know, that standart strlen won't help me, but can xmlStrlen help me?
For now i'm not using xmlStrlen and put got data straight to
std::string and it's seems to be ok, even binary, but i'm not sure
about that variant.
XML documents can't have arbitrary binary characters in them, even in a
CDATA node. See http://www.w3.org/TR/REC-xml/#charsets. In particular,
the ASCII NUL character (value 0) is not allowed.
If you have binary content, it can't appear in a CDATA node and still be
a well-formed XML document. The binary data can be encoded so it
contains only valid characters, for example in base64.
So, yes, xmlStrlen will return the length, in characters, of any valid
CDATA node.
--
Andrew
Thank you very much!! It's an idea!!!