I have a xml built like
https://msdn.microsoft.com/en-us/library/windows/desktop/ms762271(v=vs.85).aspx
I am prompting the user to enter a book name and it will return the bookname and author
[xml]$xmldata = Get-Content “books.xml”
$bookname = Read-Host “Please enter Book Name”
$book= $xmldata.catalog.book| where {$_.id -eq $bookname } |`Foreach{
$xmldata.catalog.book.id
}
It will not give me an output. Any help is appreciated.