This would be logical, but the authors of the xml routines decided to go the confusing way. ReadXMLFile reads the xml document, but it also creates it - nothing in the procedure name to indicate that...
Most users won't understand such a warning (including myself...). It would have been better to write the routine such that the user would be forced to create the doc outside ReadXMLFile. The current version leads to the same mess which Lazarus has with Listbox.Items := FindAllFiles(...). Unfortunately, it cannot be changed any more.
procedure ReadXMLFile(out ADoc: TXMLDocument; const AFilename: String); overload;
Pity that the compiler doesn't yet warn that the value assigned to doc isn't used...