Menu
Open source
Visualize XML with Infinity

Visualize XML with Infinity

Visualize XML data from your REST APIs using infinity data source plugin

📊 Overview

Give it a try using Grafana Play
Give it a try using Grafana Play

With Grafana Play, you can explore and see how it works, learning from practical examples to accelerate your development. This feature can be seen on Infinity plugin XML demo.

The following example, uses an XML response in Grafana:

image

xml
<users>
    <user age="20">
        <name>User A</name>
    </user>
    <user age="21">
        <name>User B</name>
     </user>
</users>

If you want to get the user’s name and age from the preceding XML example, use the following syntax:

Rows/Root: users.user to select all the user objects inside the user element.

Columns:

Column1 Name: Use name as the selector for the property name.

Column2 Age: Use $.age as the selector for the attribute age.

Example 2

Consider the below example:

xml
<users>
    <user age="20"> User A</user>
    <user age="21">User B</user>
    <user age="18">User C</user>
</users>

If you want to get the user’s name and age from the preceding XML example, use the following syntax:

Rows/Root: users.user to select all the user objects inside user element.

Columns:

Column1 Name: Use _ as the selector for the property name. Here _ refers to the text inside the node.

Column2 Age: Use $.age as the selector for the attribute age.

Example 3

Consider the following example:

xml
<users>
    <user>User A</user>
    <user>User B</user>
    <user>User C</user>
  </users>

If you want to get the user’s name and age from the preceding XML example, use the following syntax:

Rows/Root: users.user to select all the user objects inside user element

Columns:

Column1 Name: Use _ as the selector for the property name. Here _ refers to the text inside the node

XML URL

You can also use the hosted XML via the URL. The following example shows how you connect XML using a GitHub gist.

image

The following image shows a sample example visualized using bar gauge panel and time series format:

image