title: Saving an XML document changes single quotes to double quotes
body: <p>I have an XML file that I need to read in Delphi XE2, use XPath to find some nodes, then manipulate those nodes. The input XML file uses single quotes around attribute values. When I call SaveToFile, the XML file now has double quotes instead of single quotes around attribute values. I know in the XML spec that single vs double quotes doesn't matter, as long as they are matching. However this causes two issues: 1) The third-party program reading the XML file doesn't like the double quotes and 2) Diffs are messy to read.</p>
  
  <p>Is there a way to prevent the single quotes from changing to double quotes when I call SaveToFile?</p>
  
  <p>Although experienced in Delphi, I am new to using Delphi to manipulate XML so I may be way off on the objects I chose to use. It's cobbled together from a few examples I was able to find online.</p>
  
  <pre><code>var doc: IXMLDocument;
    Node : IDOMNode;
    Sel: IDOMNodeSelect;
    List : IDOMNodeList;
    j : Integer;
  begin
    doc := TXMLDocument.Create(Application);
    doc.LoadFromFile('somefile.xml'); //Input file uses single quotes around    attribute values
    doc.active := True;
    Sel := doc.DOMDocument as IDomNodeSelect;
    List := Sel.selectNodes('//column[not(@hidden=''true'') and @caption]');
    for j := 0 to List[i].childNodes.length-1 do
      List[i].childNodes[0].nodeValue := 'foo';
  
    doc.SaveToFile('somefile2.xml'); //This is a copy to compare against the original
    //Output file has double quotes around attribute values
  end;
  </code></pre>
  
  <p>Comments and suggestions for different objects to use with XML and XPath in Delphi are appreciated too. The code seems too cobbled together to me.</p>