本帖最后由 yiwuyun 于 2017-4-10 14:01 编辑
- if ($true){}# == ($true){}# goto ___yiwuyun
- <#BeginBatOperation#
- :___yiwuyun
- @echo off&setlocal&cls
- (echo $yiwuyun_fileName="%~f0"&echo $strPath="%~dp0"&type "%~f0")|powershell -command -
- pause
- exit/b 0
- #EndBatOperation#>
-
- <#StartPowerShell#>
- $xml=@"
- <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
- <root>
- <bat001 name="bat1" id="bat1">
- data
- </bat001>
- </root>
- "@
- $doc=New-Object -TypeName System.Xml.XmlDocument;
- $doc.LoadXml($xml);
- ###$doc.GetElementById("bat1"); 这一句不起作用
- $doc.GetElementsByTagName("bat001");### 这一句正常
-
- <#EndPowerShell#>
复制代码 有朋友遇到过吗?不会是我写法错了吧。 |