Hello Everyone, I am trying to read string from .xml file tag into variable
as ex.<Main>
<Header FileDate="01/01/2000"/>
<Body Type="Firm">
<Dept Firmid="0123" Name="abc"/>
</Body>
<Trailer RecordCount="1">
</Main>To get FileDate=01/01/2000
I am usingfor /F "tokens=2 delims= " %%i IN ('findstr /L "FileDate" D:\temp\myfile.xml) do call set var1=%%i
set set loaddate= %var1:~10,10%
echo %loaddate%
javacommand %loaddate%
I want to have loaddate=01/01/2000but by using above command var1 is not able to retrieve required value.beacuse there is no delemiter which i can specify as its takes space by defualt delimeter or is there any other way by which i can add space in Tag.
Please suggest me what should I do to fix this problem
Thank you all for any suggesion.
Please help me out to encounter this problem.
Thanks,
Stad
Trust me on this: Using urgent and 3 exclamation points is more apt to slow people down than to jump right in and help you.
You came here looking for free help, so please don't try to rush us into helping you.
If your issue truly is urgent, take out your wallet and hire a programmer.
Hi Derby, Sorry for this posted title...
actually I 'm at really critical situation...
hope u can understand...I will keep in mind for future...
thnk you.
You've prob'ly already found the solution, (you were close, but lots of syntax noise): for /F "tokens=2 delims="" %%i IN ('find /i "header FileDate=" ^< D:\temp\myfile.xml') do call javacommand %%i
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |