hi,
pls how have to do to creat filter:
okay
$Xml.reconnect.city.count
# filter count?
$Xml.SelectNodes("//2011").Count | where {$_.2011 -gt 0}| Select-Object 2011
# filter list ?
$Xml.SelectNodes("//2011") | where {$_.2011 -gt 0}| Select-Object 2011
Thanks for you help
Arnold
ps : In the TFM books i can't find out (page: 513)
Filtering xml file
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Filtering xml file
Found this post in the customer service area. I moved it to the general powershell forum. Please indicate if you still need help with this problem.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Filtering xml file
I am pretty sure this was answered in the Scripting Guys forum.
To recap - XML tag names cannot begin with a number. The XML is invalid and cannot be queried.
Also - what is this: "ps : In the TFM books i can't find out (page: 513)"
To recap - XML tag names cannot begin with a number. The XML is invalid and cannot be queried.
Also - what is this: "ps : In the TFM books i can't find out (page: 513)"