1 <?xml version="1.0"?> 2 <ModifyFiles> 3 <_Layout.cshtml>123456</_Layout.cshtml> 4 <Contact.cshtml>@section MasterPart{"/Home/About"}</Contact.cshtml> 5 </ModifyFiles>
XML节点中有小数点怎么办?怎么引用它的xpath呢?在百度没找到答案,于是google:how to deal with xml node name include dot?Get it!
其实很简单,只要把那个子节点中括号起来就好啦,就不会把它当作***.**那种子节点啦~终于解决了~
$code=($sectionPartsxml.ModifyFiles[‘Index.cshtml‘]).InnerText
时间: 2024-10-05 04:33:33