[xmlsec] sing an xml on an specific element

Luiz Rafael Culik Guimaraes luiz at xharbour.com.br
Sun Jul 18 09:34:38 PDT 2010


im using xmlsec to sing successfully xml files,
but now i need to sing an xml stating on an specific tag

taking  the xml bellow, i  need only to sign  infNFe tag
<?xml version="1.0"  encoding="UTF-8"?>
<NFe xmlns="http://www.portalfiscal.inf.br/nfe" 
   <infNFe Id="Nfe30080701077180000172010010987654314566976037" 
... // many other tags inside with info

and the resulting xml should be

<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
<infNFe Id="Nfe30080701077180000172010010987654314566976037"" versao="1.01">
...// many other tags inside with info
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">

any suggestion, ive done my signature code based on sign3.c sample

Regards and thanks in advance

More information about the xmlsec mailing list