Accessing XML resource from Delphi5
Posted: Wed Mar 08, 2006 6:03 pm
I have used resource builder to add some (static) xml to a res file. This appears in the rc file as
LANGUAGE LANG_NEUTRAL, 0
XML_PRICER_REPORT 24
MOVEABLE PURE LOADONCALL DISCARDABLE
BEGIN
0x723C, 0x7065, 0x726F, 0x2074, 0x6D78, 0x6E6C, 0x3D73, 0x6822,
0x7474, 0x3 ...........
I am trying to access this in Delphi as follows :
tmpStream := TResourceStream.Create(HInstance, 'XML_PRICER_REPORT', 'XML');
try
tmpStream.Read(XmlResult, tmpStream.Size);
OutputDocument.loadXml(XmlResult);
finally
tmpStream.Free;
end;
Delphi complains that it cannot load the resource item XML_PRICER_REPORT.
Has anyone out there any experience of this?
Thanks
Adrian
LANGUAGE LANG_NEUTRAL, 0
XML_PRICER_REPORT 24
MOVEABLE PURE LOADONCALL DISCARDABLE
BEGIN
0x723C, 0x7065, 0x726F, 0x2074, 0x6D78, 0x6E6C, 0x3D73, 0x6822,
0x7474, 0x3 ...........
I am trying to access this in Delphi as follows :
tmpStream := TResourceStream.Create(HInstance, 'XML_PRICER_REPORT', 'XML');
try
tmpStream.Read(XmlResult, tmpStream.Size);
OutputDocument.loadXml(XmlResult);
finally
tmpStream.Free;
end;
Delphi complains that it cannot load the resource item XML_PRICER_REPORT.
Has anyone out there any experience of this?
Thanks
Adrian