Discuss RoboTask here
-
dj.funny
- Posts: 6
- Joined: Thu Dec 01, 2016 5:36 pm
Post
by dj.funny »
Dear readers,
I use Save XML to make a XML-file.
From this I want to make the XML
Code: Select all
<voorraad><item><artikel>POST</artikel><aantal>-4</aantal></item><item><artikel>RING N&S</artikel><aantal>0</aantal></item><item><artikel>SC1911-117</artikel><aantal>0</aantal></item><item><artikel>SC1911-330</artikel><aantal>0</aantal></item></voorraad>
But each time there is an error: It is (I'll think) because off the & sign
How to solve this??
In the help file is the following: Automatically converts non-ASCII symbols into the UTF8 format.
When I skip the
Code: Select all
<item><artikel>RING N&S</artikel><aantal>0</aantal></item>
part the XML is made correct
Is there another way to do this?
-
Oleg
- Site Admin
- Posts: 3201
- Joined: Thu Jan 01, 1970 1:00 am
-
Contact:
Post
by Oleg »
Replace the string
RING N&S with string
RING N&S
The character
& (ampersand) is a reserved symbol in XML format. It used for special constructions.
Try my example below:
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|263000617
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task73"
Hide=INTEGER|0
ID=INTEGER|490811654
LogOnAsUser=INTEGER|1
Name=STRING|"Test XML with ampersand"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
[Actions\Action1]
ActionID=STRING|"A_XML_CREATENODE"
Enabled=INTEGER|-1
Name=STRING|"XML Create Node ""node1"" and save to ""aaa"""
Params=FOLDER
[Actions\Action1\Params]
attcount=STRING|"0"
name=STRING|"node1"
txt00000000=STRING|"RING N&S"
txtcount=STRING|"1"
variable=STRING|"aaa"
[Actions\Action2]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{aaa}"""
Params=FOLDER
[Actions\Action2\Params]
icon=STRING|"1"
msg0=STRING|"{aaa}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action3]
ActionID=STRING|"A_XML_SAVE"
Enabled=INTEGER|-1
Name=STRING|"XML Save to C:\Temp\111.xml"
Params=FOLDER
[Actions\Action3\Params]
filename=STRING|"C:\Temp\111.xml"
ifexists=STRING|"1"
xml00000000=STRING|"{aaa}"
xmlcount=STRING|"1"
Oleg Yershov