[xml] C14n for subelements



I need to canonicalize a sub-node in my xmltree

I have written a function to do this as 

void C14OutputBuffer(xmlNodePtr pNode , void **outputBuffer)

{

if(pNode == NULL || outputBuffer == NULL)

{

return

}

xmlNodeSetPtr  nodeSet  = xmlXPathNodeSetCreate(pNode); 

//nodeSet

xmlC14NDocDumpMemory(pNode->doc,nodeSet, 1 , NULL, 0, (xmlChar **)outputBuffer); 

}


How Do I add the pNode and all its sub-nodes to the NodeSet ( without using xpath ! )
xmlXPathNodeSetCreate(pNode) seems to add only 1 Node to the node set and not the child nodes 


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