Doc-O-Matic Live Demo / Microsoft Namespace / Microsoft.Xml Namespace / Classes / XPathGenerator / XPathGenerator Constructor / XPathGenerator.XPathGenerator
XPathGenerator.XPathGenerator
Close
domv10-banner-200
XPathGenerator.XPathGenerator Constructor (bool)

Namespace: Microsoft.Xml

Construct new XPathGenerator with a flag to tell it to always specify child index positions in the resulting xpath expression. By default the XPathGenerator only generates child index positions if the child is not uniquely named in the collection of children. For example, you might get the xpath expression:

<line>/html/body/p[5]/span</line>

By passing true in this constructor you will get the following instead:

<line>/html[1]/body[1]/p[5]/span[1]</line>
C++
C#
Visual Basic
IDL
JavaScript
XPathGenerator(bool useIndices);
Parameters
Description
bool useIndices
Specify whether you want the XPathGenerator to always include child index positions. Default is false.
Copyright © 2020. All rights reserved.