file_line_present_in_xml_tag

Ensure that a line is present in a tag in a specific location. The objective of this method is to handle XML-style files. Note that if the tag is not present in the file, it won't be added, and the edition will fail.

⚙️ Compatible targets: Linux

Parameters

NameDocumentation
pathFile name to edit (absolute path on the target node).

This parameter is required.
tagName of the XML tag under which lines should be added (not including the <> brackets).

This parameter is required.
lineLine to ensure is present inside the section.

This parameter is required.

Outcome conditions

You need to replace ${path} with its actual canonified value.

  • ✅ Ok: file_line_present_in_xml_tag_${path}_ok
    • ☑️ Already compliant: file_line_present_in_xml_tag_${path}_kept
    • 🟨 Repaired: file_line_present_in_xml_tag_${path}_repaired
  • ❌ Error: file_line_present_in_xml_tag_${path}_error

Example

method: file_line_present_in_xml_tag
params:
  path: VALUE
  tag: VALUE
  line: VALUE