Hello,
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;
Result := true;
except
Result := false;
end;
end else begin
AValue := '';
Result := false;
end;
end;
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives