Creating an XML Export Style


 1. Enter a name for the export style in the name textbox:


2. Enter the export details changing the data format to XML:


3. On the data tab you need to define the xml file structure. Click "Add" to add tags:


4. On the right hand grid you can define the properties of each tag.
Database column tags will be populated with data extracted from the database


The name is the name of the tag and column is the database field


5. Tags can be moved around in the xml format using the move buttons.



6. The SQL to extract the data should be entered on the SQL tab.



If the <<FILTER>> parameter is used a Filter button will be shown on the export screen for each table included and the generated filter used in the query . You can create custom parameters by adding <<name of the parameter>>
to either the select list , joins or where clause e.g.


On the export screen when the user exports the data they will be prompted to enter the country:



7. A tag can be marked as a "Section Header"


Each section has it's own SQL query. So you can define different queries for different parts of the xml file. The section will be repeated for each row returned by the query so if a query returns multiple records it's section header tag should not be the document root.


8. IGI Field types 
The following IGI field types are available

Attribute : create an xml attribute with fixed value
e.g.  Name =  xmlns:bfa2 , Text = http://www.buzonfiscal.com/ns/addenda/bf/2
produces xmlns:bfa2=”http://www.buzonfiscal.com/ns/addenda/bf/2”

Count:  create a tag containing the number of times another field in the xml has been exported.
e.g. name = NumberOfEntried , totalling = Journal
produces <NumberOfEntries>12</NumberOfEntries> if the <Journal> tag appears 12 times.

Counter: create a tag with a counter that will increment with each record exported
Credits: create a tag containing the total credits in the column being totalled.
Database attribute:  export the data from the sql statement as an xml attribute
Database column: export the data from the sql statement as a xml tag
Debits: create a tag containing the total debits of the column being totalled
Parameter: create a tag containing data passed down to IGI or entered on the IGI export screen
Rule: create a tag containing data based on a fixed rule e.g. ITASDATE
Tag: create an xml tag
Text: fixed text
Total: create a tag containing the total of another field

Test SQL
The test sql button can be used to run the IGI style sql  against the database and see the results. This can be used to debug IGI styles that are not producing the expected results



Was this helpful?
Thanks for your feedback