Hi,
Could someone please tell me how to debug when X-document load function returns error on below scenario, not sure why I get an error while loading valid XML file. May I know how load function validates/return error on this case.
Thanks.
pseudo code data/code:
================
Sample.xml content,
<?xml version="1.0"?>
Nested nodes follow this above line
cFileName = "C:\Temp\Sample.xml".
CREATE X-DOCUMENT hDocument.
ASSIGN lvError = hDocument:LOAD("FILE":U, cFileName, FALSE) no-error.
Here lvError value as FALSE as LOAD method not successful.
Hi Karikalan,
Not sure what *exactly* your question is. Are you saying simply having <?xml version="1.0"?> in the XML causes an error, or something in the "Nested nodes..."?
The value of ERROR-STATUS:GET-MESSAGE(1) should tell you more about the error.
What have you used to validate the XML you're loading? You can paste or upload your XML to http://www.xmlvalidation.com to check for errors.
Regards,
Ken Mc
As Ken said, you can see value of ERROR-STATUS:GET-MESSAGE(1) to get the error message or you can temporarily remove "NO-ERROR" and run the procedure to directly see the error.
Hi Karikalan,
Not sure what *exactly* your question is. Are you saying simply having <?xml version="1.0"?> in the XML causes an error, or something in the "Nested nodes..."?
The value of ERROR-STATUS:GET-MESSAGE(1) should tell you more about the error.
What have you used to validate the XML you're loading? You can paste or upload your XML to http://www.xmlvalidation.com to check for errors.
Regards,
Ken Mc
As Ken said, you can see value of ERROR-STATUS:GET-MESSAGE(1) to get the error message or you can temporarily remove "NO-ERROR" and run the procedure to directly see the error.
Excellent, In the nested nodes one of the node is not terminated with end-tag( Its difficult to check since vast content).
Suggested link http://www.xmlvalidation.com highlighted an exact issue. Thanks a lot.