raw_xml_replace
Replace a single XML element in a .rdl file by XPath, with safety checks for zero or multiple matches and no root element replacement. Saves changes atomically.
Instructions
Replace the single element matched by xpath with new content. content is parsed with RDL as the default namespace and 'rd:' bound, so bare names like x work without explicit xmlns. Refuses on zero matches, multiple matches, or if the xpath targets the root. Saves atomically. Returns {xpath, kind, changed}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| xpath | Yes | ||
| content | Yes | XML for the replacement element. Exactly one top-level element. |