MicrosoftDocs / PowerShell-Docs

The official PowerShell documentation sources
https://learn.microsoft.com/powershell
Creative Commons Attribution 4.0 International
1.96k stars 1.56k forks source link

Need more examples for Select-Xml #11067

Closed erentz71 closed 3 months ago

erentz71 commented 3 months ago

Type of issue

Outdated article

Feedback

Good article but examples don't fit a broad number of applications. When reading content from a file, many suggest casting the input to xml. They allude to problems with encoding, space in the first line and others. I've found the Microsoft examples don't work with many other xml files, but casting seems to have broader coverage.

Page URL

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/select-xml?view=powershell-7.4

Content source URL

https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.4/Microsoft.PowerShell.Utility/Select-Xml.md

Author

@sdwheeler

Document Id

6f99c678-7155-ae84-3775-b631a379379d

sdwheeler commented 3 months ago

Can you provide a specific example that doesn't work or needs casting?