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.
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.