Skip to content

XMLConverter Mini Language

iBaa edited this page Dec 16, 2014 · 3 revisions

Syntax:

{{command(param:param:...)}}

Section 1: defining the source

ADDXML(id:key:default)
  • load additional PMS XML as source for current aTV XML
  • key:default to evaluate to an PMS XML address, absolute (starting with '/') or relative.
  • can be accessed later using @id
VAR(id:key:default:convTable)
  • create internal variable with the value of key.
  • optional default:convTable

Section 2: modifying XML tree

COPY(tag:key:default:convTable)
  • copies the aTV XML subtree to match the number of occurrences of 'tag' in PMS XML.
  • creates internal subXML copy_
  • optional key:default:convTable to en-/disable the copy process.
  • option: wrap multiple subnodes in virtual node <__COPY__>...</__COPY__>.
COPY_PLAYLIST(tag:key(PlexConnectPlayType):dolt:key(PlexConnectRatingKey):dflt:key(ratingKey):dflt)
  • highly specialized version of COPY
  • copies the aTV XML subtree to match the number of occurrences of 'tag' in PMS XML.
  • creates internal subXML copy_
  • enables when ratingKey==PlexConnectRatingKey, disables based on playType
  • playType: Single (default), Continuous
CUT(key:default:convTable)
  • cuts the aTV XML subtree
  • key:default:convTable to en-/disable the cut.

Section 3: modifying XML elements

VAL(key:default:convTable)
VAL_QUOTED(key:default:convTable)
EVAL(key:default:math:format)
SETTING(opt)
  • access aTV setting
  • example: opt='movieview'
ADDPATH(key:default)
URL(key:default:path add-on:query string)
VIDEOURL(tag)
IMAGEURL(tag)
MUSICURL(tag)
episodestring(key:default:key:default:key:default)
  • short for S{{EVAL(key:00::&col02d)}}E{{EVAL(key:00::&col02d)}}_{{VAL(key:default)}}
getDurationString

Parameters

tag
  • node named 'tag'
  • tag = tag path/tag /path/tag @XML/path/tag ../$var/../tag
key
  • value of the given key in PMS XML
  • key = key path/key /path/key @XML/path/key ../$var/../key
convTable
  • convTable = old=new|old=new|...
math
  • mathematical function f(x)
  • math = min(x,5)
format
  • see string.format()

Special Characters

XML escape characters

&quot; "
&apos; '
&lt; <
&gt; >
&amp; &

PlexConnect escape characters

&col; :  - colon
&ocb; {  - opening curly brace
&ccb; }  - closeing curly brace