• Post category:BI Publisher
  • Post comments:0 Comments
  • Post last modified:January 22, 2021
  • Reading time:2 mins read
How to modify XML tags in BI Publisher Output?
How to modify XML tags in BI Publisher Output?
- How to modify XML tags in BI Publisher Output?
Total Visits: 11
Todays Visits: 0

There could be scenarios where in the client needs the report output in XML format and that XML file will be sent to some third-party vendor and it will be imported to their legacy systems for other processing. And the vendor might expect the XML file with some pre-defined tags for the attributes for them to process the files and in turn we will be asked to generate an XML file with specified tags.

image - How to modify XML tags in BI Publisher Output?

The Normal XML output of a data model will have the <DATA_DS> as the starting tag, and the other tags can be created by adding dataset with the specified name and selecting the attributes in the SQL with these alias names.

xml1 - How to modify XML tags in BI Publisher Output?

However, we will not have control over the main tag which is <DATA_DS> and we cannot control it using the SQL.In order to modify the XML tag from DATA_DS to INVOICE we need to follow the below steps:Data Model after the SQL has been added: 

xml2 - How to modify XML tags in BI Publisher Output?

We can see that except the first main tag, all other tags are set using the Data Set Name and Attributes.Now click on Structure tab:

xml3 - How to modify XML tags in BI Publisher Output?

We can see there is an option to override the XML tag names for main data set and it’s children and attributes.Now we will change the tag name to INVOICE as per the requirement and save it.And then go to Data Tab and click on export, it should export data to an xml file and it should look like below:

xml4 - How to modify XML tags in BI Publisher Output?

In this way we are able to change the XML tag names with a simple configuration change in the Data Model properties.

If you have any questions, please feel free to reach out to me by posting in comments section.

If you are interested in learning Fusion Technical tools go through this post

If you liked the article, please share it with your friends/ colleagues/ teammates or anyone who might also benefit from it.