[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1423
  • Last Modified:

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


0
bl00tered
Asked:
bl00tered
  • 2
1 Solution
 
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
 
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:
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now