|
Answer» Hai ppl, i am using substring to get jothish from a xml file having jothish i have USED Code: [Select]%above_strin:6,-7%it doesn't work the way it should work i searched for the same in google i found that i have to give escape character(^) before the special characters like <,>,|,&. So i can explicitly specify ^ character but if the spcial character COMES in between the above code wont work Need suggestions to solve it......
Thanks PPLI had a similar problem with html tags. Try this: set var="%above_strin:6,-7%"
hope it helps uliNO yar i cant able to resolve that using double quotes either.... Did you solve the problem using the double quotes
thanks jothishI used this to delete the tag from the var: (It didn't work WITHOUT double quotes cause of the html tag.)
set var="uli glueck" set var=%var: =%
uliif you have scripting LANGUAGES like Perl/Python or even vbscript and others similar, they can make your life easier example in Python Code: [Select]import re xmlcontents = open("yourfile.xml").read() print re.findall("<name>(.*?)</name>",xmlcontents)[0]
output: Code: [Select]jothish
|