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.

Xpath Help needed

Highlighted

Xpath Help needed

New Contributor

When you have an XML as below

<Tenders>

<Tender AbsoluteIndex="3" AccountNumber="123" />

<Tender AbsoluteIndex="6" />

</Tenders>
by using the xpath i need get the below result

xpath('<Tenders> <Tender AbsoluteIndex="3" AccountNumber="123" /> <Tender AbsoluteIndex="6" /></Tenders>', '(/Tenders/Tender/@AccountNumber)')

when use XPath I need to get an array result : [123,""]

Don't have an account?
Coming from Hortonworks? Activate your account here