Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.04 KB

File metadata and controls

35 lines (23 loc) · 1.04 KB

Rainmeter-XmlParser

Xml Parser Plugin for Rainmeter

This plugin is a wrapper around .Net System.Xml libraries.

Install

Download latest build https://github.com/e2e8/Rainmeter-XmlParser/releases

Drop XmlParser.dll into Rainmeter Plugins Folder

Usage

The plugin requires a Source and a Query. The string result returned is just the result of the XPath query (serialized if it is a list of nodes).

In most cases the desired result will be to get the the inner text of some element. XPath provides functions for this:

  • text() gets the text from a node
  • string() converts XPath result node to a string
  • normalize-space() trims leading and trailing whitespace

Source: valid xml string

Query: XPath query. https://en.wikipedia.org/wiki/XPath.

Join: (Optional) A string to use when joining Xml elements if the query results in multiple elements. Default ","

Example:

[Message]
Measure=Plugin
Plugin=XmlParser.dll
Source=<message><warning>Hello World</warning></message>
Query=normalize-space(string(/message/warning/text()))