Escape character to escape "." when Editing an XML file with powershell -


                      <something>                           <somethings.few>                             <thing  stuff1="xx"  stuff2= "xxx">                                <thing2>                                  <stuff value="yy">                                 </thing2>                             </thing>                           </somethings.few>                       </something> 

i want change value of stuff1 using powershell, problem somethings.few

$xmlfile = [xml](gc file.xml) $xmlfile.something.somethings.few.thing.stuff1="zz"    

does not work me

try this:

 $xmlfile.something.'somethings.few'.thing.stuff1 = "zz" 

no needs escape dot enclose in ' name composed it.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -