cancel
Showing results for 
Search instead for 
Did you mean: 

Create XML file for Card Transactions from Database Query

swright
New Contributor III

We need to create an XML file in Mastercard format for one of our custom cards from a database query that returns transactions with the card number, transaction amount, etc.

Some of the header information will be static while the info. come from the sql query will be dynamic.

What is the best way to design this type of pipeline? Are there examples available.

Thanks,
Scott

9 REPLIES 9

lazo_ilijoski
New Contributor III

Hi @swright,

Maybe the good approach is if you are using XSL transformations. After you fetch data from a database, then you can apply XSLT and to transform data in required format. In this way you can also set predefined static values. Even more you can have same pipeline for creating different types of XML messages (since some of the message types are pretty much similar it will save you time).

I used this approach for generating SEPA messages (they are also in XML format) and it was very easy for maintenance.

BR,
Lazo

Thanks Lazo!

I think that this will be very helpful. I have not been using XSL or XSLT and don’t know as much as I need to about using them.

Does anyone know of some sample pipelines or other examples or documentation that might help me with this?

Thanks,

Scott

swright
New Contributor III

Thanks. This is very helpful. I’m relatively new to snaplogic and haven’t used the numbers to connect snap output to input much (e.g 29 and 30 in the circles). Is this just to make the graphic fit better on the screen or are there other reasons to use this method?

Thanks,
Scott

XML Root could be $ROOT or $ROOT.ROW. I have not used schema xpath.