ReadXMLFile lazarus / 31-LCL ---------------------------------------------------------------------- JimKueneman · 2013-03-23 15:26 I know this is going to be something I am just not getting but when I try to read an XML file with ReadXMLFile in laz2_XMLRead.pas it gets to this: Code: [Select]procedure TXMLReader.ParsePI;                    // [16] var   Name, Value: DOMString;   PINode: TDOMProcessingInstruction; begin   FSource.NextChar;      // skip '?'   Name := ExpectName;   CheckNCName;   with FName do     if (Length = 3) and      ((Buffer[0] = 'X') or (Buffer[0] = 'x')) and      ((Buffer[1] = 'M') or (Buffer[1] = 'm')) and      ((Buffer[2] = 'L') or (Buffer[2] = 'l')) then   begin     if Name <> 'xml' then       FatalError('''xml'' is a reserved word; it must be lowercase', FName.Length)     else       FatalError('XML declaration is not allowed here', FName.Length);   end;                            and fails on the second FatalError. Here is the start of the XML file that I am opening: Code: [Select] .... Since I am almost XML illiterate I don't understand why this fails.  These XML files work just fine in any other app that reads XML so I don't think the syntax is wrong.  Why does the TXMLReader flag I can't have "xml" at position 3? Thanks, Jim ---------------------------------------------------------------------- vrull · 2013-04-03 00:11 Probably it's the same problem as discussed here http://www.lazarus.fr eepascal.org/index.php/topic,19347.msg110056.html#msg110056 ---------------------------------------------------------------------- BigChimp · 2013-04-03 05:36 So did anybody file a bug report with the fix in that post? Shame if this is kept from users... (And no, I'm not going to file the bug, because I'm not using the unit and I'm busy improving FPC dbf support. Other FPC/Laz developers will have similar use of their time. If somebody provides a bug report with a ready made patch and demo program, that really cuts down on the time devs need to look at improvements and makes it much more likely these volunteers will incorporate the fix for everybody to use)