PatchOperation.LogXML - notfood/PatchOperationHighlander GitHub Wiki
Writes the XML in its current state to the log, very useful to find out what happened. xpath is optional, combos well with Context.
Basic usage.
<Operation Class="PatchOperation.LogXML">
<xpath>/Defs/ThingDef[@Name="NonDeconstructibleAncientBuildingBase"]</xpath>
</Operation>
Log xpath without formatting.
<Operation Class="PatchOperation.LogXML">
<formatting>None</formatting>
<xpath>/Defs/ThingDef[@Name="NonDeconstructibleAncientBuildingBase"]</xpath>
</Operation>
Log combined with Context.
<Operation Class="PatchOperation.Context">
<xpath>/Defs/ThingDef[@Name="NonDeconstructibleAncientBuildingBase"]</xpath>
<operations>
<li Class="PatchOperation.LogXML"/>
<li Class="PatchOperationReplace">
<xpath>/ThingDef/building/deconstructible</xpath>
<value>
<deconstructible>true</deconstructible>
</value>
</li>
<li Class="PatchOperation.LogXML"/>
</operations>
</Operation>
Log the whole file, custom indent size.
<Operation Class="PatchOperation.LogXML">
<indentation>4</indentation>
</Operation>