When we analyze XML documents with XPath we may need information about number of certain items. For example, we can have an XHTML document with several tables and we can easily check which tables contain rows with ‘class’ attribute:
This is the first tip in a series of Select-Xml/XPath tips.
Working with XML documents in PowerShell is relatively easy. For most things it is enough to read XML file and convert it to XmlDocument object using XML type accelerator: