Menu

#1 xsltSaveResultToString

open
nobody
None
5
2012-08-16
2004-08-31
Anonymous
No

Hi all this function throws an AV in the first call to
xsltSaveResultToString. Am I doing something stupid ?
I'm using delphi 7 and have the latest version. Any
help very welcome.
Thanks in advance
Sam Gorman (Samuel.Gorman@tomcat.co.uk)

function TcbnGnomeLibxslt.GetResultAsString(aDocPtr :
xmlDocPtr; aStyleSheet : xsltStylesheetPtr) : String;
var
lDocTxtPtr : PPxmlChar;
lDocTextLen : LongInt;
lResult : PChar;
begin
lDocTxtPtr := nil;
xsltSaveResultToString(lDocTxtPtr, @lDocTextLen,
aDocPtr, aSTyleSheet);

GetMem(lResult, lDocTextLen);
try
xsltSaveResultToString(lDocTxtPtr, @lDocTextLen,
aDocPtr, aSTyleSheet);
StrLCopy(lResult, lDocTxtPtr^, lDocTextLen);
Result := StrPas(lResult);
finally
xmlFree(lDocTxtPtr^);
FreeMem(lResult, lDocTextLen);
end;
end;

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.