Hello.
Can anyone tell me what i make wrong with this code.
I want to insert an string (a$,b$) in this file.
Code:
a$=files[0]
b$=files[1]
xml$="<dvdauthor>\n<vmgm />\n<titleset>\n<titles>\n<pgc>\n<vob file=\"..a$..\"/>\n<vob file=\"..b$..\"/>\n</pgc>\n</titles>\n</titleset>\n</dvdauthor>"
stringtofile (xml$, "dvd.xml")
Output:
<dvdauthor>
<vmgm />
<titleset>
<titles>
<pgc>
<vob file="a$"/>
<vob file="b$"/>
</pgc>
</titles>
</titleset>
</dvdauthor>
Greetz
Tears
Strings in textfiles
Re: Strings in textfiles
You'll have to close strings before doing concatenation. \" doesn't close them, but inserts a double quote in the string, so you'll have to add couple real double quotes there.
This should work:
xml$="<dvdauthor>\n<vmgm />\n<titleset>\n<titles>\n<pgc>\n<vob file=\""..a$.."\"/>\n<vob file=\""..b$.."\"/>\n</pgc>\n</titles>\n</titleset>\n</dvdauthor>"
This should work:
xml$="<dvdauthor>\n<vmgm />\n<titleset>\n<titles>\n<pgc>\n<vob file=\""..a$.."\"/>\n<vob file=\""..b$.."\"/>\n</pgc>\n</titles>\n</titleset>\n</dvdauthor>"
Re: Strings in textfiles
Perfect.
Thank you.
Thank you.