XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
- Stylus Studio Code Samples & Utilities (364)
-> + Legacy File (2)
-> + XSD to XML Creation with all O... (2)
-> - How XML to X12 be converted an... (1)
-> - Encode and decode XML to and f... (1)
-> + Evaluating StylusStudio - .cnv... (2)
-> - Build safe NCName (1)
-> - generating .Net dataset (1)
-> + Converters for .NET (2)
-> + TRADACOMS - Code Generation (2)
-> - Flat File Custom XML conversio... (1)
-> - Need help in Generate a checkb... (1)
-> + Evaluation period for the buil... (2)
-> + Reports with ifs (2)
-> + Need Help Creating Custom XML ... (6)
-> + Need help with unique particle... (10)
-> + In need for help on converting... (3)
-> - import xml into an access (1)
-> + jaxb support (3)
-> + Large XML sample file (2)
-> + Stylus Studio 2008 R2 - From X... (2)
-- [1-20] [21-40] [41-60] Next
+ Stylus Studio Announcements (113)
Topic  
Postnext
Gaetano FerraraSubject: flat file to xml conversion
Author: Gaetano Ferrara
Date: 17 Jan 2008 09:42 AM
Hi all,
I have this issue to resolve:

I have a flat file in input which separator is "@;" and which key=value string is "@=". This is an example:

test1Name@=test1Value@;test2Name@=test2Value@; and so on...

How can I convert this flat file into an xml file using only Custom XML Conversion? If I set in the properties:

"separator" = '@',';'
"key=value character" = '@','='

it doesn't works:

<root>
<row>
<test1Name>=test1Value</test1Name>
<test2Name>=test2Value</test2Name>
<test3Name>=test3Value</test3Name>
<test4Name>=test4Value</test4Name>
</row>
</root>

Can you help me?

Best Regards,
Gaetano.

Postnext
Tony LavinioSubject: flat file to xml conversion
Author: Tony Lavinio
Date: 17 Jan 2008 11:06 AM
Add '=' to the "Toss Characters" property.

Postnext
Tony LavinioSubject: flat file to xml conversion
Author: Tony Lavinio
Date: 17 Jan 2008 11:06 AM
Oh - and remove '=' as the key=value character, leaving just '@'

Postnext
Gaetano FerraraSubject: flat file to xml conversion
Author: Gaetano Ferrara
Date: 17 Jan 2008 11:44 AM
I forgot to say that the flat file ends with \0 (NUL). If I try with the toss character setted to '=' and the key=value setted to '@' I get a java error of the adapter caused by an ArrayIndexOutOfBoundsException

Why this issue???

thanks a lot,
Gaetano.

Postnext
Tony LavinioSubject: flat file to xml conversion
Author: Tony Lavinio
Date: 18 Jan 2008 10:06 AM
First, which version are you using? See Help->About,
and the version will be something like 894m or 1050e.

Second, is there a possibility you could share a small
sample file? If you don't want to attach it here, you
could mail a copy to stylus-field-report@progress.com

Postnext
Gaetano FerraraSubject: flat file to xml conversion
Author: Gaetano Ferrara
Date: 22 Jan 2008 04:19 AM
I have the following version of Stylus Studio:

Stylus Studio 2007 builf 894m

In attachment i send an example file.


Documenttest(1).txt
an example file

Postnext
Tony LavinioSubject: flat file to xml conversion
Author: Tony Lavinio
Date: 23 Jan 2008 08:57 PM
Originally Posted: 23 Jan 2008 08:58 PM
That file doesn't include a null like your description
said, and it isn't clear from that small a sample what
the file looks like.

Is that one record with four fields?

Could you put together a slightly larger sample,
making sure it includes all of the features of the real
file, and also tell us exactly what you hope the output
would look like?

Postnext
Gaetano FerraraSubject: flat file to xml conversion
Author: Gaetano Ferrara
Date: 24 Jan 2008 03:25 AM
in attachment i send you both input file (from QA) and output file we want.

Tell me if you need more info.
Regards,
Gaetano.


Unknowninput.txt
input file from QA

Unknownoutput(8).xml
output file we want

Postnext
Tony LavinioSubject: flat file to xml conversion
Author: Tony Lavinio
Date: 24 Jan 2008 11:06 AM
Try this.


Unknowninput.conv

Posttop
Gaetano FerraraSubject: flat file to xml conversion
Author: Gaetano Ferrara
Date: 25 Jan 2008 03:16 AM
Thank you very much, it works fine.

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.