Vickyg2003 wrote:nothing on how to create an XML file.
I'm not sure why you'd want to... but just in case you want to manually markup your own Sling XML with notepad or whatever editor of choice. It is not really much difference in marking up HTML, it just has different schema and rules. Sling follows some of the
basic XML syntax rules; elements are enclosed in angle brackets and attributes in quotes. Here is an example of a single button learn Sling XML.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<learntremote
guid="7824f13b-cae1-4d21-92cb-c7994f7ca792"
remoteName="TDC8360P"
deviceType="2"
brandName="Winix"
modelName="TDC8360P"
dataFormatType="UEI"
lrzFormatVersion="1"
irBlasterVersion="4"
>
<learntremotekeys
size="1"
>
<learntremotekey
code="8"
name="Mute"
command="08101700D30404A2FB5D0114FEEB0114BC531190047905320310"
dataLength="26"
isTested="false"
>
</learntremotekey>
</learntremotekeys>
</learntremote>
The
?xml declaration element sets the following attributes.
- version - XML version
- encoding - charater set
The
learntremote root element gives the following description using eight attributes.
- guid - global unique identifier (32 digit hexidecimal with 4 dashes)
- remoteName - the remote nickname (user definable)
- deviceType - device type (user selectable, numeric references. eg,"Satellite" = "2")
- brandName - manufacturer name (user definatable)
- modelName - model name (user definable)
- dataFormatType - remote command language
- lrzFormatVersion - format version
- irBlasterVersion - Slingbox indentifier for UEI chip
The
learntremotekeys is a child element of learntremote defines a single attribute.
The "body" of the XML will be a series of learntremotekey elements. There will be one for each indicated in the size attribute of the learntremotekeys element.
The
learntremotekey are child elements of learntremotekeys and sets five attributes per learn.
- code - relative button code
- name - button name
- command - UEI learn string (no spaces)
- dataLength - number of hex pairs within the command string
- isTested - button verified (boolean)
The
/learntremotekey tag signifies the closing learntremotekey the respective element. Each will immediately follow a single learntremotekey element.
This example only had a single learn. If there were more learntremotekey elements, they would just be appended after one another.
The
/learntremotekeys tag closes the respective child element
The
/learntremote tag closes the respective root element.
These two will close out the "header elements".
Edited for her pleasure - jk, an old version of SciTE (my editor of choice) was bugging out and decided orphan the first two elements until I reinstalled. Fixed definitions accordingly.