XPath Property
Provides a way to point to a specific segment in the document.
Object Oriented Interface
public function getXPath(); public function setXPath($value);
Procedural Interface
inedifact_edifactreader_get($res, 18 ); inedifact_edifactreader_set($res, 18, $value );
Default Value
''
Remarks
The path is a series of one or more segment 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:
IX | Refers to the Interchange (root) node |
FG | Refers to a Functional Group node |
TX | Refers to a Transaction Set node |
'name' | The first segment or loop of the current container with the given schema name |
name[i] | The i-th segment of the current container with the given schema-name |
[i] | The i-th segment of the current container |
[last()] | The last segment of the current container |
[last()-i] | The segment located at the last location minus i in the current container |
.. | The parent of the current container |
BuildDOM must be set to bdEntireDocument or bdTransaction prior to parsing the document for the XPath functionality to be available.
Example (Setting XPath)
Document root (Interchange) EDIReaderControl.XPath = "/" N1 segment in the first transaction EDIReaderControl.XPath = "/IX/FG/TX/N1Loop1/N1" 3-th instance of the N2 segment EDIReaderControl.XPath = "/IX/FG/TX/N1Loop1/N2[3]"
Data Type
String