Write xml after editing record

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
rschalch
User
Posts: 8

Write xml after editing record

Post by rschalch »

Is it possible to call a function to write xml to some file after editing a record in the database ?


mobhar
User
Posts: 11905

Post by mobhar »

You may write your code in "Row_Updated" server event.

For writing to .xml file, please refer the code in the "cXMLDocument" class from the generated "ewshared*.php" file.


rschalch
User
Posts: 8

Post by rschalch »

The class is simple, however its my first time editing in PHPMaker.
Can you provide a simple example adding nodes from the table's records ?
Thank you very much !


mobhar
User
Posts: 11905

Post by mobhar »

For the example of usage, you can always refer to the "cExportXml" class in the generated "phpfn*.php" file.

The clue is, use the following functions:

  • AddRoot,
  • AddRow,
  • AddField, and
  • XML

of the "cXMLDocument" class.


rschalch
User
Posts: 8

Post by rschalch »

Thank you very much !


Post Reply