我有这一文字,读作xml文档。 档案载有坐标,我想列出坐标:
@echo off
setlocal EnableDelayedExpansion
FOR %%K IN (*.xml) DO (
SET K=%%K
SET K=!K:~0,-4!
SET "prep=0"
REM READ DATA
FOR /F "tokens=*" %%X IN (!K!.kml) DO (
if !prep! == 1 (
echo %%X
pause
FOR /F %%L IN ("%%X") DO (
SET L=%%L
IF NOT "!L:~0,1!" == "<" (
echo %%L
)
)
SET "prep=0"
)
if "%%X" == "<coordinates>" ( SET "prep=1" )
)
)
I got these result:
14.63778004128814,49.50141683426452,0 14.63696238385996,49.48348965654706,0 14.6
8840586504191,49.47901033971912,0 14.68589371304878,49.49939179836829,0 14.63778
004128814,49.50141683426452,0 </coordinates>
Press and key to continue...
14.63778004128814,49.50141683426452,0
Press and key to continue...
第一,见坐标。 第二,在第三处,有线索。 但是,我只剩下一张坐标表......。 如果我再打一个钥匙,则批量在不印刷下栏的情况下完成。 你们能否帮助?
Edit After the answer has been posted, I have question 1) could we use this:
SET LF=^
setlocal EnableDelayedExpansion
... (next code) ...
set "var=!var: =%LF%!"
因此,如果不出现拖延的低频变量,我们就能够加以掩饰。 还是不是?
和2)为什么在你的法典中出现
for %%L in ("!LF!") do set "X=!X: =%%~L!"
页: 1