Skip to content

e2e8/rainmeter-xmlparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()))