Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagedelphi
uses System.RegularExpressions

.
.
.

function getXMLTagValue(source, tag:string):string;
var
  mRegExp: TRegEx;
  match: TMatch;
begin
  mRegExp := TRegEx.Create( '<' + tag + '>(.*)</' + tag + '>', [roIgnoreCase,roMultiline]);
  match := mRegExp.Match( source);
  if match.Success then
  begin

    Result := StringReplace(match.Groups.Item[1].Value, '<br>', #13 + #10, [rfReplaceAll]);
  end else begin
    Result := '';
  end;
end;

...