Question
5
Replies
1075
Views
Posted: July 15, 2018
Last activity: September 5, 2018
Closed
How to read an xml file and update in a datatable using file listener
Hi,
I have requirement like I need to read the xml file (eg: which are having firstname,lastname,address as tag)using file listener from specified location and update the value in a data table. Here how to parse(using parse xml) and map it to clipboard in activity.
Thanks
SorenTara
***Edited by Moderator Marissa to update platform capability tags****
Hi SorenTara,
To read XML files you can configure File Listener rule as follows:
In Properties tab -> under Source properties -> enter Source name mask as *.xml
You can use an asterisk as a wildcard match.
For example, BA*.xml causes the system to find all files with type of XML that start with the two letters BA.
If you leave this blank or use a mask of *.*, the listener selects every file in the directory identified in the Source location field (skipping over any files that are themselves directories).
To update in a datatable, you can try using a function: pxConvertStringToPage in the Service activity.
Remember you need to save the page after converting, so that a record gets added to the datatable.
Hope this helps!
Let me know if you have any questions.
Thanks.