George Lober wrote:
I have this code which reads XML. I get a SIGSEGV error when reading a
NodeValue which has no content. For runtime it works ok because I put in
the try/except block, but this still produces error at design time which
is a nuisance. Any suggestions? Is there a way to check for an empty node?
function GetNodeValue(AValueName: ShortString; var AValue:
ShortString): boolean;
begin
Result := false;
ANode := ADoc.DocumentElement.FindNode(AValueName);
if ANode <> nil then begin
try
AValue:= ANode.FirstChild.NodeValue;
Just a guess: check whether ANode.FirstChild<>nil before accessing
ANode.FirstChild.NodeValue.
Bram
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives