Is there any Node.js based data transformation/mapping tool? - node.js

I'd need something like Smooks but that could execute on Node.js.
I have the need of transforming various XML formats to/from other formats and also CSV, EDI, etc.
The tool should contain some format tool where you can define the format and then some mapping component to map input format to output format.

Have you seen this lib xml2rec?

Related

Best Structure text to Translate on Crowdin

i'm working on a Location Fan Based of a videogame and for now i have a TXT with this structure :
<ID1>\t<ID2>\t<ID3>\t<ID4>\t"<stringToTranslate>"
<ID1>\t<ID2>\t<ID3>\t<ID4>\t"<stringToTranslate>"
<ID1>\t<ID2>\t<ID3>\t<ID4>\t"<stringToTranslate>"
<ID1>\t<ID2>\t<ID3>\t<ID4>\t"<stringToTranslate>"
I need to create a formatted file to translate and use the platform Crowdin ...
But I don't know what kind of structure to create, if to make a json, an ini, an xml, because then I have to create a script to convert my txt into this new type.
Thanks a lot for your help.
Any key-value file type would do the trick I believe - JSON format is a good choice (looks like you have multiple string IDs, so nested JSON will be perfect in terms of the structure)

How to read all excel and csv formats using node

I am working in building a project management tool,using MEAN(Mongodb,Expressjs,Angularjs,Nodejs) Stack.
I have a requirement in my project, where users will upload any kind of excel or csv format file and i need to parse each row from the file(excel|csv) and map it to my database model and save it has a mongodb document.I am trying to find an excel and csv parser library to accomplish my task.I also came accross xlsx, it looks good but it doesnt support reading csv files.It will be really helpful if any one could suggest a node.js library that can read all kinds of excel and csv file formats efficiently.Thanks in advance
At one point, I used Node CSV https://github.com/wdavidw/node-csv
to get the data inputted, it's really easy to use. Most of my users were fine with just having the CSV format option.....but you could combine the functionality of each library depending on the file type entered.....

systrace export as log formats like csv or text file instead of html

can we export systrace output as CSV file, so that i can parse and generate report.
There's no built-in facility for generating reports in different formats. However, if you look at the HTML, you can see that it's split into a block of javascript code that implements the viewer, followed by the data, one entry per line. Writing a script that converts the data to the format of your choice is straightforward.

How can I supply data to a JavaFX 2.0 LineChart from a file?

I need to create a LineChart and want to supply the data points via a file. I.e. the numerical values are in a text file. Is this native functionality or do I have to do it the old fashioned way?
There is no such native functionality (I think because it's hard to guess desired format -- csv, xml, json, etc). So you just need to implement simple file reader which will add Chart.Data for each read line.

To upload an excel file as a clob

Could some one give an idea about how to convert an excel file into a CLOB in oracle through JDBC. I would like to know how to covert excel file into a String using API available as part of JDK and the conversion from string to clob should be straight forward. Thanks in advance. If a similar question was already raised, kindly provide me the link.
You will need a library out side of the standard java api to read a binary excel document.
You could use the JExcelApi to read in the Excel document then create a CSV String as you read in the document.
If you don't want to use an outside library then I would change the field type to blob and use the setBlob method of java.sql.PreparedStatment passing it a FileInputStream.
When you need to parse the data (read the contents) you can use a library like Apache POI
If you want to use the only standard API, then save the excel as CSV file and process the file as a comma seperated value list. That can easily be done with readline to read each line and split that line to values using the split method on a String.
If you do not need to parse data you should stream the data directly from file to a CLOB and not first transform the excel to a String
An example can be found here: http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/LOBSample/LOBSample.java.html
What is the representation of a spreadsheet in text format? The values indented by tabs? The formulas? What if you have more than one page in the xls file?
If what you really whant to do is to store the file in the database use a BLOB and store it as bytes.

Resources