Discuss this help topic in SecureBlackbox Forum

XML: Sign XML node

To sign the XML node, you need to setup an instance of TElXMLReference (see the corresponding how-to article) as follows.

If the node is taken from the external document,

  • load the document to TElXMLDOMDocument
  • set URINode property to reference the node to be signed
  • set URI property to the URI with an anchor, for example URI="http://example.com/bar.xml#chapter1", where chapter1 is the id of the node

If the node is taken from the same document, to which the signature is placed,

  • set URINode property to reference the node to be signed
  • set URI property to the anchor, for example URI="#chapter1", where chapter1 is the id of the node

To sign multiple nodes, you can do one of the following:

  1. Select the nodes to the nodeset and assign the 0'th element of the nodeset to URINode property. You can select the nodes "manually" or use XPath. To execute XPath expression, call SelectNodes() method of TElXMLDOMNode class.
  2. Set URINode property to reference the parent node to be signed and use XPath Transform for the given reference to select one or more child nodes of the given parent node.

How To articles about XML signing (XMLDSig and XAdES)

Discuss this help topic in SecureBlackbox Forum