Hello Folks,
maybe some1 can help me with this, I spent hours trying do fiddle it out.
First of all, I’m done reading through google, I am here to get help because currently I believe something is wrong with the xml-file and to get a push to the right direction.
My job is to monitor things, right now I am trying to write a little someting, reading in xml-data with Information about some queue states (“running”, queued, errored, etc.).
XML please see: xml.xml · GitHub
- I’m using powershell ISE, I am usually not into this, so any help is much apreciated!
My aproach was:
$xml = [XML] (Get-Content -Path xml.xml) $queues = $xml.applicationsPipelineInfo.applicationInfo
second aproach is:
$xml = [XML] (Get-Content -Path xml.xml) $xml.applicationsPipelineInfo.applicationInfo | % { $_.pipelineinfo}
Thats the only way for me to get into data, a nice little table is shown with the correct entries. How would I filter these results or get only one line?
I cant reach into the xml-classes deeper below"applicationinfo", getting to the various pipelinenames, etc. Is something wrong with the style of the XML?
In my understanding the xml is already in an array, so accessing the different queues, states, etc. should be no problem? I should be able to get deeper and deeper into the document using dot notation.
My goal would be a for-each-loop generating a write-host-new-line with the state, queue, name, etc. of every queue.
Your help is much apreciated! Thank you!
Julius
PS apologies for the nickname (from googlemail)