Parse XML response in C without using library

Parse XML response in C without using library

An XML is the easiest way to carry the data in server communication. It carries data in plain text format which is readable by both human and machine. There is a lot of libraries available to parse XML response but sometimes we need to create own function to parse XML response.

You can also see, how to create an XML request in C without using a library.

In this article, I will show you that how we can parse XML response in C without using library. You can also modify the XML parsing function as per your requirement. So let see the code.

Output: Embedded c and c++

How it works?

First, need to create an open and closing tag after that find the position of the tags in response. If the tag is present in the response then parse the tag value from the response using some arithmetic operation.


    1. There are a lot of open source libraries available. I am not writing here a library. Here, I am explaining a simple and basic code to parse the XML response. Thanks for the suggestion.

Leave a Reply