DEV Community

Cover image for How to parse XML in Total.js Flow
Louis Bertson
Louis Bertson

Posted on

How to parse XML in Total.js Flow

Total.js Flow is the famous Node-red alternative. It’s a friendly, modern, straightforward Visual Programming Interface for Low-code Development accessible through a web browser.

XML stands for Extensible Markup Language. It is similar to HTML in its appearance but, XML is used for data presentation, while HTML is used to define what data is being used. XML is exclusively designed to send and receive data back and forth between clients and servers. Take a look at the following example:

Example:

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<food>
<item name="breakfast">Idly</item>
<price>$2.5</price>
<description>
Two idly's with chutney
</description>
<calories>553</calories>
</food>
<food>
<item name="breakfast">Paper Dosa</item>
<price>$2.7</price>
<description>
Plain paper dosa with chutney
</description>
<calories>700</calories>
</food>
<food>
<item name="breakfast">Upma</item>
<price>$3.65</price>
<description>
Rava upma with bajji
</description>
<calories>600</calories>
</food>
<food>
<item name="breakfast">Bisi Bele Bath</item>
<price>$4.50</price>
<description>
Bisi Bele Bath with sev
</description>
<calories>400</calories>
</food>
<food>
<item name="breakfast">Kesari Bath</item>
<price>$1.95</price>
<description>
Sweet rava with saffron
</description>
<calories>950</calories>
</food>
</metadata>

In the following video you will learn how easy you can parse XML to json within Total.js Flow (Don't forget to subscribe):


Top comments (0)