How to put a comments for each variable?


hello

i using following xml read values powershell script. want put comments each variable want put comment , comment should not create while reading values officephone xml value. please advise

<officephone>+44 123-456-7890</officephone> <# use phone in +99 999 999 999 format #>

<location>
 
<address>
   
<city>london</city>
   
<street>196 high street</street>
   
<pobox>pbox</pobox>
   
<state>londons</state>
   
<zip>e17</zip>
   
<country>uk</country>
   
<officephone>+44 123-456-7890</officephone>
  
</site>
</location>

$comment = $xml.createcomment('use phone in +99 999 999 999 format')
$node = $xml.location.site.address.selectsinglenode('officephone')
$node.appendchild($comment)

also xml badly broken.


\_(ツ)_/





Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Motherboard replacement

Remote Desktop App - Error 0x207 or 0x607

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state