Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an XML file and I want to add a filter on my attribute.
My attribute is : status
I search on the web but I didn't find the solution.
How can I add a filter on my attribute "status" with the value "valid" ?
Many thanks
Eric.
@Eric_Talend , one way is get the status colmn also in tfileinputxml and then use tfileterrows component to filter on status is valid.
Hi,
thanks for your answer.
I understood your answer.
But I have a problem to extrat the value of the attibute.
I add the column "status"in my schema, it's OK but in the column "Request XPath", how I fill this column ?
Column Request XPath
Status ??????????
I try "../catering", it's not ok
I try "../catering@status", it's not ok
I try "../catering/status", it's not ok
good !
I put "@status" and it's Ok and after, I add a filter in tXMLMap.s..
Thanks.
With tfileInputXML component, it's not possible to get an XML File ie https://mywebiste.com/xml ?
I had to copy my XML file to an local directory.
@Eric_Talend ,still do you have issues?
Yes. Last one 🙂
You can see on the screenshot below that I use a local file : "/scratch/Documents/XML/restauration.xml"
So, I would like to open a XML file who is on Internet, for exemple this XML file :
https://www.w3schools.com/xml/note.xml
,
If I put "https://www.w3schools.com/xml/note.xml" instead of "/scratch/Documents/XML/restauration.xml", I have an error 😞
@Eric_Talend , if you need to read the data in xml from website you need to use tRest or Trestclient components.
Ok, I will try during this afternoon and it works
Many, many thanks.