Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to find the value from xml flow-file in NiFi

Highlighted

How to find the value from xml flow-file in NiFi

New Contributor

Hi,

I need help to find the value from xml file, below is the xml and i want to retrieve href value in bold/underlined, below is my response after invokeHttp. Here my requirement is to get next page URL and invoke next url to get new data and i get this new url at the end of xml flow-file. I want to loop into new URL until there is no data present in the source.


here is my xml which starts with feed and end with < feed> ==> <.feed xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="https://xxx/">

<id>...</id>

<title type="text">PartnerContactCollection</title>

<updated>2019-05-17T04:28:07Z</updated>

<author>...</author>

<link href="PartnerContactCollection" rel="self" title="PartnerContactCollection"/>

<entry m:etag="W/"datetimeoffset'2019-04-04T17%3A54%3A50.1540090Z'"">

<id>

https://xxx('00163E07D')

</id>

<title type="text">

PartnerContactCollection('00163E07D')

</title>

<updated>2019-05-17T04:28:07Z</updated>

<category term="c4codata.PartnerContact" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>

<link href="PartnerContactCollection('00163E07D')" rel="edit" title="PartnerContact"/>

<link href="PartnerContactCollection('00163E07D')/PartnerContactSalesResponsibility" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/PartnerContactSalesResponsibility" type="application/atom+xml;type=feed" title="PartnerContactSalesResponsibility"/>

<link href="PartnerContactCollection('00163E07D')/PartnerContactBusinessRoleAssignment" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/PartnerContactBusinessRoleAssignment" type="application/atom+xml;type=feed" title="PartnerContactBusinessRoleAssignment"/>

<content type="application/xml">

<m:properties>

<d:UserID/>

<d:CreateUser>false</d:CreateUser>

<d:BusinessPartnerID>xxxx</d:BusinessPartnerID>

<d:Z_CMAT_ID>xxxx</d:Z_CMAT_ID>

</m:properties>

</content>

</entry>

<link rel="next" href="https://my2456.crm.ondemand.com/abc/c4c/xyz/v1/c4mnopqi/PthisChatCollect?$skiptoken=1001%20"/>

</feed>