reference_xml_element Property
This property specifies XML element to sign or verify using XPath notation.
Syntax
def get_reference_xml_element(reference_index: int) -> str: ... def set_reference_xml_element(reference_index: int, value: str) -> None: ...
Default Value
"/"
Remarks
This property specifies XML element to sign or verify using XPath notation. When signing, this must be set before calling on_sign. When verifying, this must be set from within the on_signature_info event. The reference_uri property may be used to help identify the correct XML element.
/root/myElement | XPath syntax |
/root/[1] | XPath syntax using an index |
/root/ns:myElement | XPath syntax where the element has a namespace |
myElement | Just the element name |
@id=myid | Attribute selector: This will select an element with an attribute "id" whose value is "myid". |
/root/myElement[1]/ns:name2[@attr=attrValue] | XPath syntax using an index and attribute selector |
The reference_index parameter specifies the index of the item in the array. The size of the array is controlled by the reference_count property.