Website: www.flexmonster.com
Flexmonster Pivot Table & Charts is a powerful and fully customizable JavaScript component for web reporting. It is packed with all core features for data analysis and can easily become a part of your data visualization project. The tool supports popular frameworks like React, Vue, Angular, Blazor, and more. Also, Flexmonster connects to any data source, including SQL and NoSQL databases, JSON and CSV files, OLAP cubes, and Elasticsearch.
This repository contains the utility for converting Flexmonster reports from old XML format (versions 1.5 through 2.2) to JSON format (version 2.3 and later). You can also use the converter's online version, which is available on our website.
Table of contents:
-
Download a
.zip
archive with the converter or clone it from GitHub with the following command:git clone https://github.com/flexmonster/pivot-xml-report-converter.git
The converter is located in the
js/
folder. -
Use the converter in your project. It can be done as follows:
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.min.js"></script> <!-- Include the converter in your HTML page --> <script type="text/javascript" src="pivot-xml-report-converter/js/fm-converter.js"></script> <script type="text/javascript"> const xmlReport = '<config>' + '<dataSource type="csv">' + '<filename>https://cdn.flexmonster.com/data/data.csv</filename>' + '</dataSource>' + '</config>'; let jsonReport = fmCovertXmlReport(xmlReport); console.log(jsonReport); </script>
Note that the
xmlReport
should have theString
type. In theindex.js
file, you can find an example of reading a local.xml
file and passing theString
data to the converter.
-
Install the converter with the following npm command:
npm install pivot-xml-report-converter
-
Use the converter in your project. It can be done as follows:
let converter = require('pivot-xml-report-converter'); const xmlReport = '<config>' + '<dataSource type="csv">' + '<filename>https://cdn.flexmonster.com/data/data.csv</filename>' + '</dataSource>' + '</config>'; let jsonReport = converter(xmlReport); console.log(jsonReport);
Note that the
xmlReport
should have theString
type. In theindex.js
file, you can find an example of reading a local.xml
file and passing theString
data to the converter.
In case of any issues, visit our Troubleshooting section. You can also search among the resolved cases for a solution to your issue.
To share your feedback or ask questions, contact our Tech team by raising a ticket on our Help Center. You can also find a list of samples, technical specifications, and a user interface guide there.
The XML-to-JSON report converter is released under the MIT license (free and open-source). Flexmonster Pivot is governed by the Flexmonster Software License Agreement: https://www.flexmonster.com/software-license-agreement/.
Flexmonster offers a 30-day free trial so you can evaluate our product. Pricing for commercial license models can be found on the Flexmonster pricing page.
If you need any help with your license, fill out our Contact form, and we will get in touch with you.
Follow us on social media and stay updated on our development process!