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
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext 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.

 
Go to previous topicPrev TopicGo to next topicNext Topic
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.