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)
-> + ConvertFromXML to TXT (2)
-> + Edi X12 835 to Flat file (2)
-> + License problem (2)
-> + Removal of elements from an XM... (3)
-> + XSL and Word docs (2)
-> + Develop a workflow using xml (2)
-> + Need help converting CSV to Ne... (2)
-> + Specify valid values for an el... (3)
-> + Question about the WYSIWYG fun... (2)
-> + XML diff tool (4)
-> + Validating schemas (3)
-> + Best way to fix a few hundred ... (6)
-> + Mapping problem please help me (2)
-> + Relational Database Hierarchic... (2)
-> + RDBMS - XML round-tripping (3)
-> - Converto FILE to XML (2)
-> ->Converto FILE to XML
-> - relational database acces - lo... (1)
-> + unsupportet URL scheme when tr... (6)
-> + XML in oil industry (3)
-> - Want to get the available para... (1)
-- [1-20] [21-40] [41-60] Next
+ Stylus Studio Announcements (113)
Topic  
Postnext
Heber LazcanoSubject: Converto FILE to XML
Author: Heber Lazcano
Date: 19 Jan 2007 02:58 PM
Originally Posted: 19 Jan 2007 02:57 PM
Hi.

Firts congratulations for you software.
I try Stylus for my company and i have a problem converting next file to xml.

01: IVA
02: 15.00
03: 172.67
04: 12.000
05: ST
06: 200981
07: ADAPTADOR MODULAR DB25M-RJ45 ENSAMBLADO CONECTORES
08: Desc. Adicional % : 242.42
09: 10.93
10: 131.16
11: 3009-6123456
12: 12/01/2007
13: 160
14: 2.000
15: ST
16: 200462
17: ADAPTADOR CAMBIADOR GENERO HD15 h-h CONECTORES
18:
19: 32.79
20: 65.58
21: 3009-6123456
22: 12/01/2007
23: .....


The line 01 - 03 is the tax
the line 04 - 13 is a product,
the line 14 - 22 is a other product,
and consecutively each 10 lines is a product.

I want that the XML by product:

<Producto>
<Cantidad>12.000</Cantidad>
<Unidad>ST</Unidad>
<Identificacion>ST</Identificacion>
<Descripcion>ADAPTADOR CAMBIADOR GENERO HD15 h-h CONECTORES</Descripcion>
<Descuento>Desc. Adicional % : 242.42</Descuento>
<ValorUnitario>10.93</ValorUnitario>
<Importe>131.16</Importe>
<AduanaNumero>3009-6123456</AduanaNumero>
<AduanaFecha>12/01/2007</AduanaFecha>
<AduanaNombre>160</AduanaNombre>
</Producto>

I try with row matcher, but i can't do.

How to make?????

Posttop
Tony LavinioSubject: Converto FILE to XML
Author: Tony Lavinio
Date: 01 Feb 2007 02:58 PM
Your best bet would be to use the whole-line text adapter to
read it in as XML, and then use XSLT to transform that into
your final format, using something like the position() function
to break it apart.

You can use the XML pipeline to connect together the steps,
or directly use the output of the adapter as the URL for the
input to XSLT.

Or you can use the unparsed-text feature of XSLT 2.0 and do
it all inside of the XSLT.

   
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.