Code: Select all
[xml]$xmlDocument = Get-Content -Path D:\TEMP\FileName1.xml
$xmlDocument.HardwareVerificationData.runtime.ChildNodes
$xmlDocument.HardwareVerificationData.Hardware.CPUID.ChildNodes
$xmlDocument.HardwareVerificationData.Hardware.SMBIOS.System.ChildNodes
$xmlDocument.HardwareVerificationData.Hardware.SMBIOS.System.p[4]
$xmlDocument.HardwareVerificationData.Hardware.SMBIOS.Baseboard.ChildNodes
$xmlDocument.HardwareVerificationData.Hardware.SMBIOS.Baseboard.p[4, 5]
etc...
I am not familiar with XPath, and some searching I have done suggests that XPath is the old school way to do it (from what I can tell), but I am sure there is an easier way.
Any suggestions would be greatly appreciated.