Hello Guys,
i need some help with this line in my code:
echo <text>text:\text\</text> > file.xml
Like that it simply gives error.
echo ^<text>text:\text\</text>^ > file.xml
This does almost work, but now it tells me, that it cant find the selected path and i dont know how to fix that.
I need this for Gamecode, so i cant change the structure of the text above and the problem is not the xml file, since i tried it without that parameter.
Sry for my bad english, its not my first language ^^
How to write given Text into a xml file?
Moderator: DosItHelp
Re: How to write given Text into a xml file?
The reason is that the lower-than and greater-than characters ('<', '>') are special characters which that you can redirect the output to a file:
The solution is easy.
You have noticed the circumflex accent character ('^') is an escape character, that "disables" the ability of the next character to behave like a special character, so just use it before any of the special characters above:
penpen
Code: Select all
>"test.txt" echo Hello "text.txt"!
The solution is easy.
You have noticed the circumflex accent character ('^') is an escape character, that "disables" the ability of the next character to behave like a special character, so just use it before any of the special characters above:
Code: Select all
>"file.xml" echo ^<text^>text:\text\^</text^>
penpen
Re: How to write given Text into a xml file?
penpen wrote:The reason is that the lower-than and greater-than characters ('<', '>') are special characters which that you can redirect the output to a file:Code: Select all
>"test.txt" echo Hello "text.txt"!
The solution is easy.
You have noticed the circumflex accent character ('^') is an escape character, that "disables" the ability of the next character to behave like a special character, so just use it before any of the special characters above:Code: Select all
>"file.xml" echo ^<text^>text:\text\^</text^>
penpen
Thx for answering Works great that way.