The following code fails to print the values (NodeValue) to the console:var Doc: TXMLDocument; Node1, Node2: TDOMNode; i: Integer Begin Doc := TXMLDocument.create; if (FileExists('sys_info.xml')) then XMLREAD.ReadXMLFile(Doc, 'sys_info.xml'); Node1 := Doc.DocumentElement.FindNode('login'); for i := 0 to Node1.ChildNodes.Count -1 do begin writeln(node1.ChildNodes.Item[i].NodeName + ' ' + node1.ChildNodes.Item[i]).NodeValue); end; end; The above code correctly prints out the .NodeName, but not the .NodeValue.
I've experienced the exactly same problem when the first time I use FPC/Lazarus XML unit. This is a Delphi programmer common mistake when he moves to FPC/Lazarus and doing some XML stuff. :)
For more detail information, please read the archive at http://www.mail-archive.com/[email protected]/msg04796.html
-Bee- has Bee.ography at: http://beeography.wordpress.com _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
