XHTML parsing? lazarus / 13-General ---------------------------------------------------------------------- Laeken · 2009-03-23 00:17 Hi, Do you know how I can parse xhtml files? I tried with the MYTHcode library but unfortunatly with some bugs in the parsing of my files... With Google I found a message were someone suggest to use XMLRead to do that and I found a doc in the wiki, but nothing to explain me how to use it with xhtml? My tries to simply load the file with this line ReadXMLFile(Doc, ' c:\test\test.html'); give me an error : Project raised exception class 'unknown'. Please, what do you suggest? By the way i'm a total newbie with Lazarus but I used Delphi 4 in the past.. Thanks ---------------------------------------------------------------------- WarpedOne · 2009-05-24 16:45 I get exactly the same error: Project raised exception class 'Unknown'. It happens at line calling ReadXMLFile. Step into does not get into body of the function. Sample code: Code: [Select]program project1; {$mode objfpc}{$H+} uses Classes, SysUtils, DOM, XMLRead; var ADoc: TXMLDocument; begin   ReadXMLFile(ADoc, 'out.xml'); end. Is this yet another bug? Enivornment: Version #: 0.9.26.2-0 beta FPC Version: 2.2.2 SVN Revision: x86_64-linux-gtk OS: Ubuntu 9.04 x86-64 Update:  Exception only appears if I run the program from Lazarus IDE, if started from command-line, it works. Any idea? Update 2:  Problem solved. Actually, If I started the program from command line it worked but gave me an exception about invalid character in XML file. Running it from IDE, gave just 'Uknown' exception on line ReadXMLFile. When I fixed the XML document, it started to work in IDE also. Obviously there are some problems with exception handling in XMLRead unit.