I have the following XML response being returned in my Oracle OIC Integration engine:
<ListFileResponse xmlns="http://xmlns.oracle.com/cloud/adapter/ftp/Listfiles_REQUEST/types">
<ListResponse xmlns="http://xmlns.oracle.com/cloud/list/pull">
<position>1757090194000</position>
<ItemCount>2</ItemCount>
<FileList>
<File>
<directory>/integration/in/inventory/depletion/queue</directory>
<filename>INVADJ20250829143000.DAT</filename>
<lastModifiedTime>1756824857000</lastModifiedTime>
<creationTime>0</creationTime>
<size>3121</size>
</File>
<File>
<directory>/integration/in/inventory/depletion/queue</directory>
<filename>INVADJ20250905111500.DAT</filename>
<lastModifiedTime>1757090194000</lastModifiedTime>
<creationTime>0</creationTime>
<size>914</size>
</File>
</FileList>
</ListResponse>
</ListFileResponse>
I would like to subsequently use an Xpath expression to only fetch the first file found and get the lastModifiedTime value. So in this example above I would expect to output 1756824857000 from the first set returned.
I am using the following Xpath expression attempting to get just the first occurence of the tag but it errors out in my OIC when there is more than one file in the SFTP folder.
$Listfiles/ns32:ListFileResponse/ns31:ListResponse/ns31:FileList/ns31:File[1]/ns31:lastModifiedTime
Is there an expression I can use (or modify the above) to accomplish this? Thanks in advance.
$Listfilescontaining more than one item. The first is used when there's only one but fails otherwise. So the problem might be outside the XPath. May be there's a way to iterate$Listfiles