JSON - dotted navigation, with quoting for keys that contain dots:
Logging.LogLevel.Default - three nested objectsSerilog.'MinimumLevel.Default' - a literal key containing dotsServices[0].Url - zero-based array indexXML - shorthands for the two .NET configuration collections:
appSettings.ApiUrl - the value attribute of the matching entryappSettings.BankApi:Key - colons and dots are literal here, never navigationconnectionStrings.Default - the connection stringconnectionStrings.Default.@providerName - the provider name instead
Matching is exact and case-sensitive. Only entries directly inside the top-level
appSettings or connectionStrings element are considered; entries inside
<location> and external files referenced by file= are not.
XML - anything else is reached by walking elements from the document root, ending in
.@attribute or .#text:
configuration.'system.webServer'.security.requestFiltering.requestLimits.@maxAllowedContentLength
- a nested attribute; note that an element name containing a dot must be quotedconfiguration.branding.title.#text - the element's own textconfiguration.'system.webServer'.handlers.add[1].@name - the second matching
sibling, zero-basedconfiguration.location.'system.web'.authorization.deny.@users - content inside
<location>, which the shorthands do not reach
Element names match exactly as written, namespace prefix included. If a step matches more than one
sibling and carries no index, the build fails rather than guessing which one you meant - add
[0], [1] and so on to choose. Missing elements and attributes are
reported as missing paths and are never created.
.#text replaces everything between the tags, indentation included, so an element
written across several lines collapses onto one. This is the only case in which a substitution
changes whitespace. It also requires the element to hold text and nothing else - one containing
child elements, comments or CDATA is reported as ambiguous rather than having its markup
overwritten.