Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't know of a tool like that, but a developer ought to be able to produce a powershell script, or a perl script, that does this in a matter of 10-15 minutes. </p> <p>If you post the sample of the XML file, I'll bet someone might even post working code. If you phrase your Q as a challenge, you'll get more people to respond. Depending on the complexity of the XML file, it might be as few as 10 lines of script. </p> <hr> <p>If there are other requirements, like - if you want the new GUIDs to all be selected from a particular range - that will still be possible and straightforward, but you'll need to state all those requirements. </p> <hr> <pre><code>## ## ReplaceGuids.ps1 ## ## Reads an XML document, and emits an output doc. The output replaces ## the Text value of each node in the input with LocalName="UniqueId", with ## a new Guid. ## ## Thu, 10 Dec 2009 12:06 ## # Create the XmlReader $xr = [system.Xml.XmlReader]::Create("c:\data\Doug.xml") # Create the XmlWriter $sw = New-Object System.IO.StringWriter $xw = New-Object System.Xml.XmlTextWriter $sw $xw.Formatting = "indented" $xw.Indentation = 2 $elementName = "" # loop over each element in XmlReader while ($true) { if ($xr.Read() -eq $false) { break; } switch ($xr.NodeType.ToString()) { "Element" { $xw.WriteStartElement($xr.Name) $xw.WriteAttributes($xr, $false) if ($xr.IsEmptyElement) { $xw.WriteEndElement(); $elementName = ""; } else {$elementName = $xr.LocalName; } } "EndElement" { $xw.WriteEndElement() $elementName = "" } "Text" { if ($elementName -eq "UniqueId") { $guid = [System.Guid]::NewGuid() $xw.WriteValue($guid.ToString()) } else { $xw.WriteValue($xr.Value) } } } } $xr.Close() $xw.Flush() $sw.Flush() Write-Output $sw.ToString() </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload