[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


Hi

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" 
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <infNFe Id="Nfe30080701077180000172010010987654314566976037" 
versao="1.10">
... // many other tags inside with info
   </infNFe>
</NFe>


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
</infNFe>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
.
</NFe>

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

Regards and thanks in advance
Luiz 




More information about the xmlsec mailing list