1. mahmoud mahmoud
  2. PowerBuilder
  3. Monday, 14 November 2022 07:56 AM UTC

hello i have pb12.6 and i want to generate xml code from my program

can any one send me way to do this ?

Andreas Mykonios Accepted Answer Pending Moderation
  1. Monday, 14 November 2022 09:20 AM UTC
  2. PowerBuilder
  3. # 1

Hi.

XML Files can be simple or very complex. Depending on your situation, from powerbuilder you can generate XML files using:

  • datawindows (saveas method can save as xml when saveastype is set to XML!). This is for simple xml files. The datawindow designer does support import / export templates for xml but you will find that you cannot use it to created xml with to many nested levels of information.
  • PBDOM. Here you have the freedom to generate xml files of any complexity. But you have to do this programmatically by using objects included in PBDOM.

If you want to get information about PBDOM take a look at Powerbuilder help file by searching keyword PBDOM. Alternately you can take a look at the following link:

About PBDOM - - Application Techniques (appeon.com)

While this document is part of PB 2022 documentation, information included should be valid for PB 12.6 as I don't remember any changes in the usage of PBDOM. But be careful because the deployment may be a little bit different (I don't remember if PB 12.6 was providing a pbdom126.pbd, but I believe only the pbx file was available).

Andreas.

Comment
  1. Sivaprakash BKR
  2. Tuesday, 15 November 2022 06:51 AM UTC
Adding to the above,

Other option would be to create a string with all required xml tags and value, and write it to a file with FileOpen, FileWriteEx, FileClose commands. It also works.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.