Here I am going to show you how to return different response formats (content negotiation) from Flask REST API. The default response format you receive from the REST API is JSON (JavaScript Object Notation). Now for some requirements you may need to return XML format from your REST API. Then this example may help you…

Posted in Flask

How to return Different Response Formats (JSON, XML) in Flask REST API

Introduction Here I am going to show you an example on how to return different data formats from REST API using Spring Boot framework. You may have a requirement that you need to return multiple formats, such as XML, JSON, etc., from the REST response, then this example may help you. This example will return…

Posted in Spring Boot Spring REST

How to return Different Data Formats (JSON, XML) from Spring REST API

In this example you are going to see how you can convert XML data into CSV data. XML is an Extensible Markup Language and CSV is Comma Separated Values. In this example I am going to read both XML file and XML string and show you how to display the converted csv string data in…

Posted in Python

How to convert XML to CSV using Python

Introduction Here I am going to create an example on how to convert CSV to XML. CSV means Comma Separated Value. So the sources of these values may be different. These values may be put into a file or in a string. XML is an Extensible Markup Language that defines a set of rules for…

Posted in Python

How to convert CSV to XML using Python

Introduction SAX – Simple API for XML, allows you to process a document as it is being read, which avoids the need to wait for all of it to be stored before taking action. So it takes less memory to process an XML document, whereas DOM (Document Object Model) parser first stores the whole document…

Posted in Java

SAX – Simple API for XML

What is DOM ? A DOM – Document Object Model is a collection of nodes, or pieces of information, organized in a hierarchy. This hierarchy allows a developer to navigate around the tree looking for specific information. Analyzing the structure normally requires the entire document to be loaded and the hierarchy to be built before…

Posted in Java

DOM – Document Object Model

Introduction Modifying XML using Python programming language means updating or modifying an existing XML file or XML string using Python. Extensible Markup Language (XML) are the most widely used formats for data, because this format is very well supported by modern applications, and is very well suited for further data manipulation and customization. Therefore it…

Posted in Python

Modifying XML using Python

Introduction Building XML using Python programming language means creating an XML file or XML string using Python. We have seen how to parse or read an existing XML file or string using Python in my previous tutorial. Here we will see how to create an XML file or string using Python from scratch. We will…

Posted in Python

Building XML using Python

Introduction Parsing XML using Python is a matter of few lines of code has to be written.  The XML could be in a file or XML could be a string. So basically parsing XML using Python means reading the XML node data and further doing something with those data to use in our application. Extensible Markup…

Posted in Python

Parsing XML using Python

Introduction The example, convert csv to xml using PHP, shows conversion of csv data to xml data. As the title suggests to convert csv to xml using PHP, so I will convert either csv file to xml file or csv string to xml string. When I convert csv string to xml string you will see the…

Posted in PHP

How to Convert CSV to XML using PHP

Introduction The example, convert xml to csv using PHP , shows conversion of xml data to csv data. As the title suggests to convert xml to csv using PHP, so I will convert either xml file to csv file or xml string to csv string. When I convert xml string to csv string you will see…

Posted in PHP

How to Convert XML to CSV using PHP

In this tutorial I will show you how to remove namespace from XML using XSLT. Removing namespaces from an XML document is not recommended and is in essence comparable to removing namespaces from a programming framework or library. It may risk name clashes and lose the ability to differentiate between distinct elements. But if you…

Posted in Java

How to Remove Namespace from XML using XSLT