IP*Works! V9 - Online Help
IP*Works! V9
Questions / Feedback?

XPath Property

Provides a way to point to a specific element in the document.

Syntax

__property String XPath = {read=FXPath, write=FSetXPath, default=""};

Default Value

""

Remarks

XPath implements a subset of the XML XPath specification, allowing you to point to specific elements in the XML documents.

The path is a series of one or more element accessors separated by '/'. The path can be absolute (starting with '/') or relative to the current XPath location.

The following are possible values for an element accessor:

'name'A particular element name
name[i]The i-th subelement of the current element with the given name
[i]The i-th subelement of the current element
[last()]The last subelement of the current element
[last()-i]The subelement located at the last location minus i in the current element
name[@attrname="attrvalue"]The subelement containing a particular value for a given attribute (supports single AND double quotes)
..The parent of the current element

When XPath is set to a valid path, XElement points to the name of the element, with XParent, XNamespace, XPrefix, XChildren, and XText providing other properties of the element. The attributes of the current element are provided in the XAttributes properties.

Example (Setting XPath)

Document rootODataControl.XPath = "/"
Specific ElementODataControl.XPath = "/root/SubElement1/SubElement2/"
i-th ChildODataControl.XPath = "/root/SubElement1[i]"
Specific EntryItemODataControl.XPath = ODataControl.EntryItems[i].XPath

Data Type

String

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 9.0.6635.0