XML Monitor
Available in the Starter plan and above.
What is XML?
XML (Extensible Markup Language) is a flexible, tag-based text format primarily used for data structuring and interchange.
It’s readable by both humans and machines, and is commonly employed in web services, RSS feeds, and configuration files for its ability to structure data consistently across various systems.
How to monitor an XML file for changes?
The Distill XML monitor tracks online XML files used in web services, RSS feeds, and data interchange. The XML monitor automates checking for changes in XML formatted data hosted online and sends alerts when changes are detected.
In the XML monitor you can use XPath for selecting sections within the XML formatted data.
Note: RSS and Atom feeds, which commonly use XML format, can be effectively monitored using Distill Feed monitor.
Supported HTTP Methods for XML Monitoring
- GET: Retrieves data from a specified resource and is the most commonly used method.
- POST, PUT, PATCH, DELETE: These methods are typically used for creating, updating, or deleting resources.
How to add an XML monitor using Distill?
-
Open the Watchlist from the Web app at https://monitor.distill.io or navigate to your extension’s Watchlist.
-
Click
Add Monitor
->XML
. -
Enter the URL of the web service you want to monitor in the URL field. If additional configurations are needed, like specific HTTP request parameters, headers, or body content, use “Add Query Param”.
-
Click the “GO” button. This action will send an HTTP GET request to the specified URL.
-
When the page content loads, click “Select” button.
-
Click on the “Save” button. It will open the Option page with monitor’s configuration. You can modify this as per your requirement.
-
Set the desired check interval, alert actions, and conditions.
-
Once done, click “Save” and the XML monitor should appear in your watchlist. You can preview the changes tracked from your watchlist.
Using XPath for selecting specific elements in XML pages
XPath facilitates precise selection of specific nodes in an XML document. It’s ideal for monitoring targeted sections for any changes or updates.
-
Create XPath expressions that accurately target the nodes you’re interested in.
For example, /bookstore/book to select all ‘book’ elements under ‘bookstore’. You can add more complex expressions with predicates, E.g: To select plants requiring ‘Mostly Shady’ light conditions: //plant[@light=‘Mostly Shady’].
-
In the Options page, click on the gear icon next to “Open XML Selector” button.
-
Select “Config JSON”.
-
Add the XPath selector expression in the configuration text box.
-
Click “Save”.