I'm not a developer.
I need to hack an XML file to duplicate hundreds of resources that are each assigned a GUID. Is there a way to parse the entire file, replacing each GUID found in a tag with a dynamically generated one?
Basically - every UniqueID tag (but not the ContentUniqueID tags) needs a new GUID.
<root xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<Name>[redacted]</Name>
<UniqueId>7a136c33-3ea8-4f99-8f99-bbe411972203</UniqueId>
<Enabled>true</Enabled>
<Behavior>EmptyOnly</Behavior>
<Subscriptions />
<ScheduledFormatTemplates>
<ScheduledFormatTemplate>
<Name>[redacted]</Name>
<UniqueId>1cfaba3e-bfd5-4d2f-a1df-14020ad2f7da</UniqueId>
<ContentUniqueId>67c58741-fe1b-4c15-8dc0-8b4c01f6f18f</ContentUniqueId>
<ScheduledContents>
<ScheduledContent xsi:type="SFTR">
<Name>[redacted]</Name>
<UniqueId>b4a60646-b62b-43e7-b2a2-7d37875ab33f</UniqueId>
<ContentUniqueId>ba634a97-9faf-4bfa-a9b4-d8a2475b82e6</ContentUniqueId>
<ScheduledContents>
<ScheduledContent>
<Name>[redacted]</Name>
<UniqueId>6f8e6e6c-1f94-4caa-8730-6859448138eb</UniqueId>
<ContentUniqueId>938b0a24-4043-4a16-bc2d-25dbdb21a659</ContentUniqueId>
</ScheduledContent>
</ScheduledContents>
</ScheduledContent>
</ScheduledContents>
</ScheduledFormatTemplate>
</ScheduledFormatTemplates>
</root>