Is it possible to read a .txt file which has "|" as seperator using smooks? The file is similar to a normal csv file, only the extension is .txt. For csv we make use of "csv-reader", what can I use for reading a .txt file? Or is there any way to convert the .txt file into .csv in WSO2 Integration Studio?
This is the content of my file:
SYS_CD|PRO_CD|LOC_CD|AVA_QTY|RESQTY|PRO_QTY
POS|15|90|00|0|067656400
This is how I am calling the Smooks in my Proxy.
<smooks config-key="Smooks-config-file">
<input type="text"/>
<output type="xml"/>
</smooks>
This is my smooks-config-file
<?xml version="1.0" encoding="UTF-8"?>
<localEntry key="Smooks-config-file" xmlns="http://ws.apache.org/ns/synapse">
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.5.xsd">
<csv:reader fields="SYS_CD,PRO_CD,LOC_CD,AVA_QTY,RESQTY,PRO_QTY" separator="|" skipLines="1"/>
</smooks-resource-list>
</localEntry>