2012-12-07 3 views

답변

1

libxml API docs은 합리적으로 보이며 xmlBufGetNodeContentxmlBufContent은 원하는대로 할 수 있습니다.

xmlNode node1, node2; 
...... 
xmlBuf buf; 
xmlChar* content1 = NULL; 
xmlChar* content2 = NULL; 
if (xmlBufGetNodeContent(&buf, &node1) == 0) { 
    content1 = xmlBufContent(&buf); 
} 
if (xmlBufGetNodeContent(&buf, &node2) == 0) { 
    content2 = xmlBufContent(&buf); 
} 
if (strcmp(content1, content2) == 0) { 
    /* nodes match */ 
}