[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[文本处理] 批处理怎样根据条件提取指定内容?

文件中有多个<site></site>
需要在多个<site></site>中
根据1标记的内容查2标记的内容,并将返回的值输出到txt文件
        <sites>
            <site name="Default Web Site" id="1" serverAutoStart="true">
                <application path="/">
                    <virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:80:ddddd" />
                    <binding protocol="http" bindingInformation="*:80:dddd.com" />
                </bindings>
            </site>
            <site name="aaa" id="2" serverAutoStart="true">
                <application path="/" applicationPool="aaa">
                    <virtualDirectory path="/" physicalPath="C:\1" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:80:aaaaaa.com" />
                    <binding protocol="http" bindingInformation="*:80:aaa.com" />
                </bindings>
            </site>

回复 1# ailuck


    你需要处理的是xml文件吗?
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

返回列表