Try OpenEdge Now
skip to main content
Working with XML
Reading and Writing XML with the Document Object Model (DOM) : Reading XML input into ABL : Loading an XML file : Loading an XML file from a MEMPTR
 
Loading an XML file from a MEMPTR
An XML file can be read from a MEMPTR as the following code fragment demonstrates:
DEFINE VARIABLE memfile AS MEMPTR NO-UNDO.
. . .
FILE-INFO:FILE-NAME = "meminp.xml".
SET-SIZE(memfile) = FILE-INFO:FILE-SIZE.

INPUT FROM "meminp.xml" BINARY NO-CONVERT.
IMPORT memfile.
INPUT CLOSE.
hDoc:LOAD("memptr",memfile,FALSE).
. . .