Powerbuilder 10.5 - Validate XML Format

Hi,

I am using the ImportFile function to imprt data satored in an XML file,
as below.
li_error = dw_1.ImportFile(XML!,"C:\test\Temp.xml")

Are there any functions I can use to ensure that the structure
of the xml file I am importing matches that of the xml tempate
I have set up in the  data import setting of the dataobject.

Thanks

DL


bl00teredAsked:
Who is Participating?
 
sandeep_patelCommented:
I believe there is no such function but if format doesn't match ImportFile will return -12. See PB help of ImportFile for more return codes.

Regards,
Sandeep
0
 
bl00teredAuthor Commented:
Hi,

I am using the ImportFile function to imprt data stored in an XML file,
as below.
li_error = dw_1.ImportFile(XML!,"C:\test\Temp.xml")

Are there any functions I can use to ensure that the structure
of the xml file I am importing matches that of the xml template
I have set up in the  data import setting of the dataobject.

Thanks

DL

0
 
bl00teredAuthor Commented:
Thanks Sandeep.
I thought that might be the case. I am trying to capture the error before the default Powerbuilder error message displays

li_error = dw_1.ImportFile(XML!,"C:\test\Temp.xml")

I can see the error value in li_error, but the PB error message fires before I can supply a more user friendly error message. Is there anyway that I can prevent PB displaying the error.

DL
 
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.