Search notes:

PowerShell cmdLet select-XML

select-XML allows to formulate XPath queries on XML documents.
select-XML returns a Microsoft.PowerShell.Commands.SelectXmlInfo object.

Simple example

[xml] $xml = "
<root>

  <items id='1'><item>eggs</item> </items>
  <items id='2'><item>foo</item><item>bar</item><item>baz</item></items>
  <items id='3'><item>hen</item></items>

</root>"

$xml.root.items[1].item[2]
#
# baz

($xml | select-xml -xpath '/root/items[@id="2"]').value
#
# baz
Github repository about-PowerShell, path: /cmdlets/xml/select/XPath/simple.ps1

See also

Powershell command noun: XML

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1758209359, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/command-inventory/noun/XML/select/index(61): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78