IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Profile: msto1
About
User Name: msto1
Forum Rank: Newbie
Real Name:
Location Netherlands
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Thursday, December 22, 2016
Last Visit: Thursday, December 22, 2016 2:33:52 PM
Number of Posts: 3
[0.02% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: Output-method text missing returns
Posted: Thursday, December 22, 2016 2:33:52 PM
Thanks again K101, this is very helpful. I am hesitant to move to mapforce entirely, because it's a whole new philosophy, and we currently have a working xquery file, which is quite complex. Migrating an xquery file from zorba / basex to raptorxml is relatively simle. The syntax is only mildly different.

It's worth it to evaluate how easy/difficult it is to migrate from an xquery system to mapforce though, I will try this.
Topic: Output-method text missing returns
Posted: Thursday, December 22, 2016 10:19:53 AM
Thanks K101.

The missing xquery command was due to lack of copy paste, and the omit-xml-declaration does indeed turn out to be useless and should be true. For future reference, I've modified the OP with the correct command.

I'm struggling a little bit with what the best approach would be. Previously I've used a solution where xquery was used to flatten/restructure the XML and XSLT was used to convert to CSV.
However, the largest file I need to process now is about 2.4GB, and every second in performance helps.

Oddly enough, both Zorba 3.0 and BaseX supported a form of CSV serialization, so I assumed RaptorXML had a similar feature set. Unfortunately, both BaseX and Zorba also have other issues when processing these large files.

I will investigate manually forming CSV in xquery versus adding an additional output step with xslt. Both seem feasible if not less than ideal.
Topic: Output-method text missing returns
Posted: Thursday, December 22, 2016 9:11:04 AM
I'm currently evaluating replacing several open source options with Altova RaptorXML. The primary use case is performing huge XML transformations with specifically formed CSV as output.
The form of CSV is dictated by using "flat" XML elements - which is the output of my xquery. I expect this XML:

Code:
<lines>
<line>
<field1>A</field1>
<field2>B</field2>
<field3>C</field3>
</line>
<line>
<field1>D</field1>
<field2>E</field2>
<field3>F</field3>
</line>
</lines>


to be saved as CSV in this format:
Code:
A;B;C
D;E;F


It's currently being exported to CSV as:
Code:
ABCDEF


I'm currently using this commandline
Code:

RaptorXML
xquery
--input=file.xml
--output=out.csv
--output-method=text
--output-encoding=windows-1252
--omit-xml-declaration=true
--output-indent=false
query.xq


How do I set the separator and return types (CrLF)?




Use of the Altova User Forum(s) is governed by the Altova Terms of Use.