[xmlsec] How to get the next node?

Aleksey Sanin aleksey at aleksey.com
Thu Feb 8 08:05:38 PST 2007

It depends on the location if the next "ToEncrypt" node:
1) if it is a child of cur:
	cur = xmlSecFindNode(cur->children, "ToEncrypt", 0);

2) if it is a sibling of cur:
	cur = xmlSecFindNode(cur->next, "ToEncrypt", 0);

3) if it is located somewhere else: no one line solution.
The easiest thing would be to write your own code to walk
DOM tree with a callback. Or simply use XPath :)


Mike Fudd wrote:
> Hello Mailinglist,
> I want to encrypt all nodes with the name "ToEncrypt"
> In the encrypt example I have found this line:
> cur = xmlSecFindNode(xmlDocGetRootElement(data->doc), "ToEncrypt", 0);
> How can I get to the next node with the name "ToEncrypt"?
> Mike
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE! 
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec

More information about the xmlsec mailing list