Doniu
Doniu

Reputation: 115

Ignore Namespace in XML document using Powershell

I have huge list of XML files (over 100 000) and wanted to access specific node value in each of them using powershell. Issue I'm having is that all of them have namespaces that take you nowhere. Do you know what would be the best way to ignore it?

Upvotes: 1

Views: 1208

Answers (1)

js2010
js2010

Reputation: 27433

[xml]$xml = Get-Content file.xml

Then access $xml as a PowerShell object (e.g. $xml.some.node).

Upvotes: 3

Related Questions