The XML Wrap and Unwrap technique
Kevin Frank has a guest blogger at FileMakerHacks, Guiseppe Pupita, an Italian FileMaker developer who has developed a modular way to process outgoing and incoming xml packets. He calls his technique wrap and unwrap:
I developed a solution to send electronic invoices to the State Administration (for those who are maniac enough and fluent in Italian, details here: http://www.filemakerguru.it/emergency-room/fatturazione-elettronica-verso-pubblica-amministrazione/).
Briefly you need to create an XML file containing the invoice data; many fields use codes provided by the administration. You need to check that all mandatory fields have been filled, that field format and length falls within given limits, and that some fields have a value if some conditions are met. …
I therefore developed a technique, that I dubbed wrap & unwrap; it basically creates a single block of text containing the update data.
The data are wrapped into an XML shell, encapsulating each data element (table, record, field) into appropriate XML tags. The block of text can be sent to the remote location, where it will beunwrapped, thus recreating the original records.
Warning for those worried about XML: don’t worry, it’s elementary XML.
The general idea here is to synch certain portions of two databases in different locations using a couple of custom functions (notice- FileMaker Pro Advanced is required to install custom functions). The process is to generate an xml file with the changes, email or otherwise get the file to the other database location, and have the user there process that file.
Pretty straightforward, and Pupita has applied it to real life situations successfully, so you know it works. Download the sample files and work your way through it. Yet another tool for the developer toolbox.
The XML Wrap and Unwrap technique | FileMakerHacks.