Use this example for EC to be able to distinguish or detect EventData messages supporting numbered element detection of xpath, that is /bookstore/book[1..n]
.
Note: The XPath "/a/b/c"
is equivalent to "/a/b/c[1]"
. It
is not allowed for both to be created in the same XML Target.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<EventData>
<Publisher>M3</Publisher>
<DocumentName>FGLEDX</DocumentName>
<Operation>CREATE</Operation>
<TrackingId>cab00804-efbd-4d8c-8af7-9e43753a84a7</TrackingId>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<EventData>
<Publisher>M3</Publisher>
<DocumentName>FGLEDX</DocumentName>
<Operation>CREATE</Operation>
<TrackingId>cab00804-efbd-4d8c-8af7-9e43753a84a7</TrackingId>
<SentTimestamp>2011-04-07T01:15:34.182-07:00</SentTimestamp>
<Document>
<ElementData>
<Name>startProgram</Name>
<Value>GLS040CL</Value>
</ElementData>
<ElementData>
<Name>currentProgram</Name>
<Value>GLS040</Value>
</ElementData>
<ElementData>
<Name>StartTimeMillis</Name>
<Value>1302164102126</Value>
</ElementData>
<ElementData>
<Name>Job no</Name>
<Value>679518557716169333</Value>
</ElementData>
<ElementData>
<Name>Owner</Name>
<Value>14785</Value>
</ElementData>
.
.
.
<ElementData>
<Name>LAST_ONE</Name>
<Value>LAST_VALUE</Value>
</ElementData>
</Document>
</EventData>
The Xpath "/EventData/Document/ElementData/Name" gives the element data "startProgram"
The Xpath "/EventData/Document/ElementData/Name[1]" gives the element data "startProgram"
The Xpath "/EventData/Document/ElementData/Name[2]" gives the element data "currentProgram"
The Xpath "/EventData/Document/ElementData/Value[5]" gives the element data "14785"
The Xpath "/EventData/Document/ElementData/Name[last()]" gives the element data "LAST_ONE"
The Xpath "/EventData/Document/ElementData/Value[last()]" gives the element data "LAST_VALUE"
|