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 (2016)
+ Stylus Studio FAQs (159)
- Stylus Studio Code Samples & Utilities (364)
-> + create an xml document with ex... (2)
-> + Default xml converter from com... (2)
-> + Transforming Data With XSLT (5)
-> + Error when creating pdf file (5)
-> + Got Shkespear XML Doc from web... (3)
-> + VFP 8 (2)
-> + CSV import (7)
-> + Generating X12 from XML (4)
-> + How to handle variable input &... (2)
-> + Grab html to xml (2)
-> + XML To X12 conversion using in... (3)
-> + XSLT mapping help required (2)
-> + convert XML to JAVA (2)
-> + Insert a carriage return or li... (3)
-> + Automatation for comparing two... (2)
-> - Filter records (1)
-> + BIT Fields (3)
-> + Restricted Mixed Content (4)
-> - Freelance Project - Mapping di... (1)
-> - flat file to xml conversion (10)
-> ->flat file to xml conversi...
-> ->flat file to xml conversi...
-> ->flat file to xml conversi...
-> ->flat file to xml conversi...
-> ->flat file to xml conversi...
-> ->flat file to xml conversi...
-> ->flat file to xml conversi...
-> ->flat file to xml conversi...
-> ->flat file to xml conversi...
-- [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.