I would like to read the content of XML files in SharePoint Online. I would like to check if the XML file contains some text. I already tried something like this but it is not working:
Connect-PnPOnline https://myCompany.sharepoint.com/teams/SomeSiteCollection $fileRelativeURL = "/SomeDocumentLibrary/test.xml" $file = Get-PnPFile -Url $fileRelativeURL -AsListItem $stream = $file.OpenBinaryStream()
But the stream is empty and has no value.
How to get the content of a file in PowerShell and SharePoint Online?