New-XPathQueryGroup
Description
The New-XPathQueryGroup
cmdlet create a new group of query objects that can be used to create an XPath expression using New-XPathExpression, or an element in an XPath query group using New-XPathQueryGroup. The resulting XPathExpression can be passed as a parameter to Search-Resources. An XPath query group contains one or more Xpath query objects or other XPathQueryGroup objects.
Syntax
Parameters
Operator
Required. Specifies the logical operator to use when comparing queries within the group. The support values are And
and Or
Queries
Required. One or more query objects generated with the New-XPathQuery or New-XPathQueryGroup cmdlets
Examples
Viewing the query group string
The New-XPathQueryGroup
does not return a usable query itself. It returns only a part of the query that is used in an XPath expression. You can view the query component itself as shown in the following example.
This returns an string representing the query component
Building a simple query
In order to use the query, it must be rendered by an XPath expression created with the [[New-XPathExpression]] cmdlet
This returns an expression containing the query
Building a nested query
A query group can contain other groups as well as standard queries.
The expression generated is as follows
Last updated