I have XML data in a memptr and would like to save the file to a document. When I compete the save process only part of the XML document is saved to the file. My code looks as follows
The data in the mempr looks as follows
The data saved to the XML file is only this portion
Attempting to open the XMl file results on the following error
This page contains the following errors:
error on line 2 at column 76: Extra content at the end of the document
Below is a rendering of the page up to the first error.
What would cause only part of the XML data in the memptr to be saved to the xml file and how to I fix this?
Code:
DEFINE VARIABLE hDoc AS HANDLE NO-UNDO.
CREATE X-DOCUMENT hDoc.
hDoc:LOAD("memptr", avariablememptr, FALSE).
hDoc:SAVE("FILE", axmlfile).
DELETE OBJECT hDoc.
The data in the mempr looks as follows
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE protocol SYSTEM "https://www.url.com/payxml/payxml_v4.dtd">
<protocol ver="4.0" pgid="10011072130" pwd="test"><authrx tid="65340489" cref="BH Record Locator: 79285" stat="1" sdesc="Approved" res="990017" rdesc="Auth Done" ctype="1" bno="0" auth="5TLQZ3" risk="AX"/></protocol>
The data saved to the XML file is only this portion
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE protocol SYSTEM "https://www.url.com/payxml/payxml_v4.dtd">
Attempting to open the XMl file results on the following error
This page contains the following errors:
error on line 2 at column 76: Extra content at the end of the document
Below is a rendering of the page up to the first error.
What would cause only part of the XML data in the memptr to be saved to the xml file and how to I fix this?