C/C++ API
HSM Dinamo
Loading...
Looking for...
No entries found
Use of XML filters

The filter adopts the following format: namespace|qualifier|id. The separator character is | (pipe). O namespace is the one defined in the xmlns attribute, the qualifier can be present in more than one tag and the id must be unique in the document. An empty filter indicates that the signature covers the entire document. The construction of a valid filter depends on the structure of the XML.

In an XML where the namespace is defined, the valid filters are:

  • "" (without URI)
  • XML_FILTER_NULL_URI (generates null URI)
  • "namespace|qualifier|id"

In an XML with no namespace definition, the valid filters are:

  • "" (without URI)
  • XML_FILTER_NULL_URI (generates null URI)
  • "|qualifier|id"

Example of XML with namespace:

<?xml version="1.0"?>
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
<infNFe Id="XFGR143576863578" versao="1.01">
...
</infNFe>
</NFe>

In this example, the namespace is http://www.portalfiscal.inf.br/nfe, the tag qualifier is infNFe and the id is XFGR143576863578.

Valid filters:

  • "" (empty)
  • XML_FILTER_NULL_URI (generates null URI)
  • "http://www.portalfiscal.inf.br/nfe|infNFe|XFGR143576863578"


Example of XML without namespace:

<?xml version="1.0"?>
<NFe>
<infNFe Id="XFGR143576863578" versao="1.01">
...
</infNFe>
</NFe>

In this example there is no namespace (empty field in the filter), the tag qualifier is infNFe and id is XFGR143576863578. Note the presence of the first separator to mark the namespace empty.

Valid filters:

  • "" (empty)
  • XML_FILTER_NULL_URI (generates null URI)
  • "|infNFe|XFGR143576863578"