[xml] ampersand conversion


this code is giving me "error : unterminated entity reference" with

xmlNodePtr node = xmlNewNode(NULL, BAD_CAST "test");
if( node ) {
        const char* str = "<>\"'&";
        xmlNodeSetContent(node, BAD_CAST str);

I know, that some specific character have to be encoded/quoted, but all
others are already being encoded internally and I would just have to
replace the ampersand by myself. Is this a wanted behavior? Because it
seems a bit inconsistent to me encoding all the others, but not the

So long

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]