xmlscripting-en
Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | xmlscripting-en [2025/06/27 15:08] (current) – [foreach] rjversluis | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== XMLScript ====== | ||
+ | [[: | ||
+ | [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * Examples: | ||
+ | * [[: | ||
+ | |||
+ | | [[: | ||
+ | |||
+ | {{: | ||
+ | ^ NOT FOR NOVICE USERS !!! ^ | ||
+ | =====Warning===== | ||
+ | - Do not replace standard Rocrail functions with XMLScript. | ||
+ | - Do not try to mangle the automatic Rocrail engine. | ||
+ | - The scripts are executed asynchrone, and needs multithreading programming know how. | ||
+ | - If encountering unexpected behaviour: Turn off XMLScript actions. | ||
+ | - If uncertain: Do not use XMLScript, or ask for help in the __**[[https:// | ||
+ | - Do not use the same variables in multiple XMLScripts, which will be set to new values, to avoid unexpected results including Server crashes. | ||
+ | |||
+ | |||
+ | __**[[start# | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====Introduction===== | ||
+ | :!: Check basic Rocrail functionality before inventing the wheel again with XMLScript.\\ | ||
+ | |||
+ | XMLScript can be used in combination with __**[[: | ||
+ | Its primary goal is to simplify and to reduce the number of actions and conditions.\\ | ||
+ | The XML used for XMLScript is the same as used in the __**[[https:// | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====Requirements===== | ||
+ | * UTF-8 Editor, for example __**[[https:// | ||
+ | * Windows Notepad editor is __**not supported**__. | ||
+ | * Some programming and XML knowledge. | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====Recommendation===== | ||
+ | * Keep the XMLScript short and without long sleeps and long loops; It will block the calling object from processing events and commands if it is not defined as __**[[: | ||
+ | * Do not try to outsmart the automatic mode; Post a feature request in the forum instead if something basic is missing. | ||
+ | * Object IDs with blanks are not supported; Use underscores instead. | ||
+ | * Variable/ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====Setup===== | ||
+ | //Blanks in path or filename are not supported!// | ||
+ | |||
+ | - Create a XMLScript and save it in a file. (See: __**[[# | ||
+ | - Create a "run ext. program" | ||
+ | - Select the XMLScript file. (If the script file is in the workspace directory a path is not necessary.) | ||
+ | - Ready to use this action on any Rocrail object. | ||
+ | {{: | ||
+ | |||
+ | ====Simple Example==== | ||
+ | Switch on the track power and start the automatic mode: | ||
+ | <code xml> | ||
+ | < | ||
+ | <sys cmd=" | ||
+ | <auto cmd=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====Edit on the Server===== | ||
+ | To create and edit an XMLScript on the Server the Action Dialog can be used:\\ | ||
+ | | {{: | ||
+ | | Open the editor. | ||
+ | If the XMLScript does not already exist on the Server a XMLScript skeleton will be created:\\ | ||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | > The XMLScript editor can also be opened by a double click on the Index. | ||
+ | \\ | ||
+ | If "< | ||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====Validate==== | ||
+ | Check if the XML is "Well Formed" | ||
+ | |||
+ | ====Insert==== | ||
+ | {{: | ||
+ | Insert the selected statement or command at the cursor position.\\ | ||
+ | The [**\n**] checkboxes control the line feeds before and after the statement.\\ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | |||
+ | ====macOS==== | ||
+ | :!: To use this editor the "**Use smart quotes and dashes**" | ||
+ | {{: | ||
+ | **System preferences -> Language & Region -> Keyboard preferences -> Text** \\ | ||
+ | |||
+ | %% | ||
+ | With this option enabled, which is by default, it will automatically convert double hyphens (--), used in XML comments, into em dashes (—), | ||
+ | and (" | ||
+ | %% | ||
+ | \\ | ||
+ | __**This will make the XMLScript invalid.**__ \\ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====Calling Parameters===== | ||
+ | Calling parameters can be accessed by variables with the naming of " | ||
+ | See: __**[[: | ||
+ | Snippet: | ||
+ | <code xml> | ||
+ | < | ||
+ | <if condition=" | ||
+ | < | ||
+ | </ | ||
+ | </if> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====Statements===== | ||
+ | ====foreach==== | ||
+ | The **foreach** loop is used for "do this to everything in this table" with optional a condition and/or state.\\ | ||
+ | The loop can be stopped with a **break** or **exit** statement.\\ | ||
+ | If the condition and/or state does not match it skips to the next object in this table.\\ | ||
+ | <code xml> | ||
+ | < | ||
+ | <foreach table=" | ||
+ | <fn fnchanged=" | ||
+ | <vr id=" | ||
+ | <vr id=" | ||
+ | <lc cmd=" | ||
+ | <sleep time=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | This script will iterate the loco table and will switch function 3 on and give the go command for every loco.\\ | ||
+ | The **oid**, the ID of the current Object in the list, value is automatically generated in the loop.\\ | ||
+ | In case the table is **lclist** the short ID can also be used: %soid%" | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | <foreach table=" | ||
+ | <lc cmd=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | This foreach starts every loco with the class BA.\\ | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | <foreach table=" | ||
+ | <if state=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | Start every loco which resides in block ' | ||
+ | |||
+ | |||
+ | ===Notes=== | ||
+ | * All object related variables will be filled with the actual object values in the loop. (Example: %lcid% will be set in a foreach for every loco in the lclist.) | ||
+ | \\ | ||
+ | |||
+ | ====while==== | ||
+ | The **while** statement is a loop and can check condition, states and class. At least one of them should be defined otherwise the while loop will not be executed.\\ | ||
+ | As long as the statement is true the commands in the **while** will be executed.\\ | ||
+ | <code xml> | ||
+ | < | ||
+ | <vr id=" | ||
+ | <while condition="# | ||
+ | <vr id=" | ||
+ | < | ||
+ | <sys cmd=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | If the while loop is endless it will be stopped by the max attribute which is default 10.\\ | ||
+ | Higher max values than 100 will be truncated to 100 to avoid server blocking and crashing automatically running locomotives.\\ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | |||
+ | ====if==== | ||
+ | The **if** statement is used for flow control and can check condition, states and class.\\ | ||
+ | If the statement is true the commands in the **then** will be executed, if its not true the **else** commands will be executed.\\ | ||
+ | The **else** is optional.\\ | ||
+ | <code xml> | ||
+ | < | ||
+ | <if condition="# | ||
+ | < | ||
+ | <lc id=" | ||
+ | <tx id=" | ||
+ | </ | ||
+ | < | ||
+ | <lc id=" | ||
+ | <lc id=" | ||
+ | <bk id=" | ||
+ | <bk id=" | ||
+ | </ | ||
+ | </if> | ||
+ | </ | ||
+ | </ | ||
+ | The text value of the variable **loco** contains the loco ID.\\ | ||
+ | If the loco ID does not exist a block will be searched by that ID and in case it exist the loco ID in the block will be used.\\ | ||
+ | Both **condition** and **state** may be used in the **if** statement. At least one of them must be specified.\\ | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | <if state=" | ||
+ | < | ||
+ | <tx id=" | ||
+ | </ | ||
+ | < | ||
+ | <tx id=" | ||
+ | </ | ||
+ | </if> | ||
+ | </ | ||
+ | </ | ||
+ | Text **tx1** is set to " | ||
+ | If this Routes are not in state **locked**, **tx1** is set to " | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ====switch==== | ||
+ | The integer value of the switch var is used to select the case with the same value.\\ | ||
+ | If no match was found the default will be used in case its defined.\\ | ||
+ | |||
+ | ===Number example=== | ||
+ | <code xml> | ||
+ | < | ||
+ | <switch var="# | ||
+ | <case val=" | ||
+ | <sys cmd=" | ||
+ | </ | ||
+ | <case val=" | ||
+ | <auto cmd=" | ||
+ | </ | ||
+ | < | ||
+ | <sys cmd=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | // Multiple case values are deprecated, and are strongly discourage to use.//\\ | ||
+ | A case may have multiple integer values in the following format:\\ | ||
+ | <code xml> | ||
+ | <case val=" | ||
+ | </ | ||
+ | One of the values must match.\\ | ||
+ | |||
+ | ===String example=== | ||
+ | <code xml> | ||
+ | < | ||
+ | <switch var=" | ||
+ | <case val=" | ||
+ | <sys cmd=" | ||
+ | </ | ||
+ | <case val=" | ||
+ | <sys cmd=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | Note: //A switch statement has nothing todo with a Rocrail Switch-Object.// | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ====call==== | ||
+ | Functions must be declared in the first level of the XMLScript and must have set an ID.\\ | ||
+ | Call the function with the wanted ID: ''< | ||
+ | Multiple functions are allowed.\\ | ||
+ | Parameters can be accessed by %subparam1%...%subparamN%.\\ | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | < | ||
+ | <tx id=" | ||
+ | </ | ||
+ | |||
+ | <switch var="# | ||
+ | <case val=" | ||
+ | <sys cmd=" | ||
+ | </ | ||
+ | < | ||
+ | <sys cmd=" | ||
+ | <call id=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | ===Restrictions=== | ||
+ | * Calls in functions are not supported. | ||
+ | * Max. call depth is 5. | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ====exit==== | ||
+ | Exit the XMLScript. The cmt=" | ||
+ | <code xml> | ||
+ | < | ||
+ | <if condition=""> | ||
+ | < | ||
+ | <exit cmt=" | ||
+ | </ | ||
+ | </if> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | ====break==== | ||
+ | Ends a foreach and while loop with or without condition. The cmt=" | ||
+ | This statement has no effect if its not within a foreach loop.\\ | ||
+ | <code xml> | ||
+ | < | ||
+ | <foreach table=" | ||
+ | <if condition=""> | ||
+ | < | ||
+ | <break cmt=" | ||
+ | </ | ||
+ | </if> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | ====trace==== | ||
+ | XMLScript traces will be in green color in Rocview. | ||
+ | <code xml> | ||
+ | < | ||
+ | <trace text=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | |||
+ | ====sleep==== | ||
+ | A sleep time in ms. | ||
+ | <code xml> | ||
+ | < | ||
+ | <foreach table=" | ||
+ | <if condition=""> | ||
+ | < | ||
+ | <sleep time=" | ||
+ | </ | ||
+ | </if> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ====sub==== | ||
+ | Call another XMLScript with file=" | ||
+ | <code xml> | ||
+ | < | ||
+ | <sub file=" | ||
+ | </ | ||
+ | </ | ||
+ | If the function ID is set to underscore, id=" | ||
+ | If no function ID is set the %oid% will be used to find a fitting function.\\ | ||
+ | Parameters can be accessed by %subparam1%...%subparamN%.\\ | ||
+ | \\ | ||
+ | Library example **lib1.xml**: | ||
+ | <code xml> | ||
+ | < | ||
+ | < | ||
+ | <sys cmd=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | The function ID must be used to call functions from a XMLScript library file.\\ | ||
+ | Most helpfull if more then one XMLScript share common functions.\\ | ||
+ | \\ | ||
+ | |||
+ | ====query==== | ||
+ | With the query statement a variable can be used to get the attribute text and integer value of a certain object.\\ | ||
+ | A query does only provide object properties and no run time information.\\ | ||
+ | <code xml> | ||
+ | <query vr=" | ||
+ | </ | ||
+ | After the query the variable can be use for comparing text and/or numbers. Normal text will have a zero value result.\\ | ||
+ | \\ | ||
+ | To get a value from a sub node: | ||
+ | <code xml> | ||
+ | <query vr=" | ||
+ | </ | ||
+ | Instead of the subidx the subid can also be used if the sub node has an ID.\\ | ||
+ | |||
+ | | Query variables must be XMLScript unique to avoid unexpected results. :!: | | ||
+ | |||
+ | ===Function example=== | ||
+ | The loco ID, //locid//, is retrieved from block **cb4** in variable **lcid**.\\ | ||
+ | The function command requires a loco ID, which is provided by the text contents of the variable **@lcid**.\\ | ||
+ | <code xml> | ||
+ | < | ||
+ | <query vr=" | ||
+ | <fn id=" | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | ====set==== | ||
+ | With the set statement a variable can be used to set the attribute text or integer value, depending of setint, of a certain object.\\ | ||
+ | <code xml> | ||
+ | <set vr=" | ||
+ | </ | ||
+ | \\ | ||
+ | To set a value of a sub node: | ||
+ | <code xml> | ||
+ | <set vr=" | ||
+ | </ | ||
+ | Instead of the subidx the subid can also be used if the sub node has an ID.\\ | ||
+ | \\ | ||
+ | ====clock==== | ||
+ | | 15401+ | | ||
+ | With the clock get command: | ||
+ | <code xml> | ||
+ | <clock cmd=" | ||
+ | </ | ||
+ | three variables will be updated. | ||
+ | ^ Variable name ^ Value ^ Text ^ | ||
+ | | modeltime | hour * 3600 + minute * 60 + seconds | hh:mm.ss | | ||
+ | | realtime | hour * 3600 + minute * 60 + seconds | hh:mm.ss | | ||
+ | | systemtick | count of 10ms since Rocrail server start | - | | ||
+ | The systemtick will overflow at 4294967295(119.3 hours) on 32bit and 18446744073709551615 on 64bit systems.\\ | ||
+ | |||
+ | \\ | ||
+ | =====Condition format===== | ||
+ | | value | comparator | value |\\ | ||
+ | Additional conditions must be separated with a pipe character __**without any extra blank**__: | ||
+ | < | ||
+ | condition="# | ||
+ | </ | ||
+ | See for possible variables: __**[[: | ||
+ | \\ | ||
+ | ^ System variables ^^ | ||
+ | | &time | Model time in seconds | | ||
+ | |||
+ | \\ | ||
+ | ^ Comparators ^^ | ||
+ | | = | equal number | | ||
+ | | ! | not equal number | | ||
+ | | # | equal text | | ||
+ | | - | not equal text | | ||
+ | | > | greater than number | | ||
+ | | < | smaller than number | | ||
+ | | ~ | contains text (@var_1 ~ @var_2 is true, when text of var_1 contains complete text of var_2) - since version 2.1.1010| | ||
+ | |||
+ | ====alltrue==== | ||
+ | Alltrue is default true if its not set.\\ | ||
+ | If **alltrue** is set to false only one of the conditions, one of the states and one of the classes must be true.\\ | ||
+ | |||
+ | ====connect==== | ||
+ | In case the if statements contains conditions, states and or classes, those are connected by default with **and**.\\ | ||
+ | If only one of the must be true, the connect attribute can be set to **or**.\\ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | |||
+ | =====State/ | ||
+ | | Object type | | Object ID without blanks | | Comparator | | State/Class value |\\ | ||
+ | The values must be separated with blanks.\\ | ||
+ | Additional states must be separated with a pipe character __**without any extra blank**__: | ||
+ | < | ||
+ | state=" | ||
+ | </ | ||
+ | |||
+ | :!: Object IDs with blanks are **not** supported; Use underscores or dots instead.\\ | ||
+ | |||
+ | |||
+ | |||
+ | ^ Comparators ^^ | ||
+ | | = | equal state | | ||
+ | | ! | not equal state | | ||
+ | \\ | ||
+ | |||
+ | ====State Objects==== | ||
+ | ^ Object Name ^ Object type ^ State values ^ Remark ^ | ||
+ | | Signal | sg | red, green, yellow, white, blank, aspect number | | | ||
+ | | Switch | sw | left, right, straight, turnout, locked, free, unlocked | | | ||
+ | | Sensor | fb | true, false, on, off | true = on, false = off | | ||
+ | | Output | co | on, off, active | | | ||
+ | | Location | location | free | The ' | ||
+ | | Block | bk | free, occupied, closed, open, reserved | | | ||
+ | | Turntable | tt | free, occupied, closed, open, reserved, #, pending | The # represents the current bridge position. \\ If state pending is true the bridge is moving. | | ||
+ | | Route | st | free, locked, unlocked, closed | | | ||
+ | | System | sys | go, stop | | | ||
+ | | Automode | auto | on, off | | | ||
+ | | Locomotive | lc | fwd, rev, +, -, min, mid, cruise, max, block, "// | ||
+ | | Car | car | empty, loaded, maintenance, | ||
+ | | Waybill | waybill | waiting, shipping, delivered, "// | ||
+ | | Text | tx | on, off | In case the toggle switch option is set. | | ||
+ | |||
+ | ====Class Objects==== | ||
+ | ^ Object Name ^ Object type ^ | ||
+ | | Block | bk | | ||
+ | | Loco | lc | | ||
+ | | Route | st | | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====Commands===== | ||
+ | Note: \\ | ||
+ | * With " | ||
+ | * The special implemented action commands are listed separately. | ||
+ | |||
+ | |||
+ | \\ | ||
+ | ^ Object Name ^ Object type ^ Commands ^States ^ Remark ^ Example ^ | ||
+ | | Loco | lc | All https:// | ||
+ | | Function | fn | All and fndesc, fncmd, group 1..7 | | The fnchanged or the fndesc, function description, | ||
+ | | Switch | sw | All | | | ||
+ | | Signal | sg | All | | | ||
+ | | Accessory Group | accgroup | on, off, flip | | | ||
+ | | Output | co | All | | | ||
+ | | Power | powercmd | on, off | | The id is the boosterID. If left empty the command is for all boosters | | ||
+ | | Block | bk | All, reserve | open, closed | Use lcid in case of reserve command. | %%<bk id=" | ||
+ | | Sensor | fb | All, on, off, flip | | | ||
+ | | Route | st | go, lock, free, classset, classadd, classdel | open, closed | The lock and free command needs the extra attribute **locid**=" | ||
+ | | Text | tx | showon, showoff, blink, on, off, click | | Update event by format attribute. \\ The optional **bkid** and **lcid** may be used in the command also. | %%<tx id=" | ||
+ | | Variable | vr | random, start, stop \\ start, length (for substring) | | Set by attribute: %%value=" | ||
+ | | Action control | actionctrl | | | The id in the actionctrl is a reference to an existing action. Condition child nodes may be added. | | ||
+ | | Operator | operator | emptycar, loadcar, addcar, leavecar | | In the carids attribute a list of cars must be specified. | | ||
+ | | System | sys | All https:// | ||
+ | | Automat | auto | All https:// | ||
+ | | Car | car | empty, loaded, maintenance, | ||
+ | | Staging block | sb | All https:// | ||
+ | | Fiddle Yard | seltab | All https:// | ||
+ | | Location | location | All https:// | ||
+ | | Clock | clock | All https:// | ||
+ | | Turntable | tt | All https:// | ||
+ | | External | ext | All https:// | ||
+ | | Weather | weather | setweather, weathertheme, | ||
+ | | Light | light | flip, enable, disable | | Enable a light from LightControl. | | ||
+ | | LightControl | lightctrl | go, stop | | Enable / disable LightControl. | %%< | ||
+ | | Model | model | All https:// | ||
+ | | MVTrack | mv | reset, sets1, sets2, setdistance, | ||
+ | |||
+ | ====Attribute values==== | ||
+ | If a command attribute value starts with a question mark it will be replaced with attribute value of the referenced object.\\ | ||
+ | Example: | ||
+ | <code xml> | ||
+ | <lc id=" | ||
+ | </ | ||
+ | The %%"? | ||
+ | < | ||
+ | 20160422.085709.015 r9999I tid0x8BA OXmlScri 0571 execute [lc] id[loco1] cmd[useschedule] oid[] callerid[wefiu] | ||
+ | 20160422.085709.016 r9999I tid0x8BA OXmlScri 0521 replaced attribute value: scheduleid="? | ||
+ | 20160422.085709.017 r9999a tid0x8BA OLoc 3644 <lc id=" | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | \\ | ||
+ | |||
+ | ====Object IDs==== | ||
+ | The object IDs may contain variables.\\ | ||
+ | See for possible variables: __**[[: | ||
+ | |||
+ | ===Example=== | ||
+ | <code xml> | ||
+ | < | ||
+ | <tx id=" | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== System variables ===== | ||
+ | see: [[https:// | ||
+ | =====Variable Format===== | ||
+ | With the format attribute it is possible to format variable content in the same way as printf.\\ | ||
+ | ====Example==== | ||
+ | <code xml> | ||
+ | < | ||
+ | <vr id=" | ||
+ | <vr id=" | ||
+ | <vr id=" | ||
+ | <trace text=" | ||
+ | </ | ||
+ | </ | ||
+ | Output __with__ the format attribute looks like: | ||
+ | < | ||
+ | Hello03: | ||
+ | </ | ||
+ | Output __without__ the format attribute looks like: | ||
+ | < | ||
+ | Hello 3 5 RocrailFans | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | \\ | ||
+ | =====Variable Names===== | ||
+ | Within the limits described above, variable names can be freely named; but as soon as two scripts with the same variable name run at the same time the scripts may not work correctly. In those cases a script specific prefix added to the name of the variable may avoid any confusion: | ||
+ | * change the original variable name from " | ||
+ | * within script " | ||
+ | * within script " | ||
+ | |||
+ | =====Variables defined as " | ||
+ | In order to store a variable from runtime to runtime in Rocrail, these variables must be defined as " | ||
+ | ====Example==== | ||
+ | <code xml> | ||
+ | < | ||
+ | <vr id=" | ||
+ | <vr id=" | ||
+ | </ | ||
+ | </ | ||
+ | The variable " | ||
+ | The variable " | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====Tips===== | ||
+ | ====XML Well Formed==== | ||
+ | To check the XMLScript if its well formed it can be opened in a WEB Browser.\\ | ||
+ | Some characters must be escaped: | ||
+ | ^ Char ^ Escape ^ | ||
+ | | < | < | | ||
+ | | & | & | | ||
+ | | > | > | | ||
+ | |||
+ | ===Example=== | ||
+ | This is not well formed but accepted by the Rocrail XML Parser: | ||
+ | < | ||
+ | condition="# | ||
+ | </ | ||
+ | To check it with a WEB Browser it must be changed in: | ||
+ | < | ||
+ | condition="# | ||
+ | </ | ||
+ | This is also valid for the Rocrail XML Parser.\\ | ||
+ | \\ | ||
+ | |||
+ | \\ | ||
+ | |||
+ |