XML Validation Error Messages

Cecil

19+ years progress programming and still learning.
OE 10.1B
OS Linux 4 SE

I am using WebSpeed to read and XML file created from a 3rd party using READ-XML method. However my problem is that the method only returns a logical value depending if the XML file was loaded correctly and I am unable to capture the error of why it did not load.

So when reading a XML file using the READ-XML method and it does not load correctly and returns false. How do I find out what is wrong with the XML document?

There is an error written to the WebSpeed Server log file which is no good for the end user.

I've tried using IF ERROR-STATUS:ERROR THEN DO:blah blah blah blah. But this returns no errors and yes I do have NO-ERROR appended to the READ-XML method.

Currently I am having to validate the XML file using Progress Stylus Studio to find out what is wrong with the document.

Any suggestions?:confused:
 

KrisM

Member
What do
error-status:get-message(1)
error-status:get-message(2)
error-status:get-message(3)
...
return ?
 

Casper

ProgressTalk.com Moderator
Staff member
I think an endkey will be generated when the read fails. Any luck with capturing that?
Or else try catch?

Casper.
 
Top