In this recipe, we will learn how to process data taken from an XML file and extract it using the stream reader.
Processing XML data using the stream reader
How to do it...
Let's create a simple program that reads and processes XML files by following these steps:
- Create a new Qt Widgets Application project at your desired location.
- Open any text editor and create an XML file that looks like the following, then save it as scene.xml:
<?xml version="1.0" encoding="UTF-8"?>
<scene>
<object tag="building">
<name>Library</name>
<position>120.0,0.0,50.68</position>
<rotation>0.0,0.0,0.0</rotation>
<scale>...