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)
-> - Stylus Studio - Registrar en o... (1)
-> + Stylus Studio - Registrar en o... (2)
-> + Can a pipeline send a file by ... (2)
-> + After Updateing WIN10 to WIN11... (12)
-> + Where do I add the custom java... (3)
-> + Where is the Diagram tab? (5)
-> + Applying XSLT to Word DOCX/XML (2)
-> - CSV conversion via ConvertToXM... (1)
-> + Text symbols in SS not same as... (4)
-> + Exposing xquery as webservice ... (6)
-> + Syntax Identifier (2)
-> + Saving a Converted XML as an X... (5)
-> + Output document cannot be pars... (4)
-> - Archiving output from conversi... (1)
-> + EDIFACT guideline from Stylus ... (3)
-> + CSV file putting all the data ... (5)
-> + Can't install Home version 64b... (5)
-> + presale - Can I covers this sc... (5)
-> + Problem with UNB (5)
-> + Splitting EDIFACT files pipeli... (4)
-- [1-20] [21-40] [41-60] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2016)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Bobby BoydSubject: flatfile Convert to XML
Author: Bobby Boyd
Date: 19 Aug 2005 07:00 PM
Hi,

I'm on day 3 of my evaluation. Awesome software here.

I'm trying to convert a flatfile to xml and I'm still a bit lost after the web video and user manual.

As a toy example, I'm trying to work with the log files from a popular online gaming site (partypoker). Here's what they look like:

#Game No : 2555315034
***** Hand History for Game 2555315034 *****
NL Texas Hold'em $50 Buy-in + $5 Entry Fee Trny:14943662 Level:1 Blinds(10/15) - Thursday, August 18, 09:43:21 EDT 2005
Table Table 11469 (Real Money)
Seat 6 is the button
Total number of players : 9
Seat 3: SandroGrande ( $985 )
Seat 6: XoOPy ( $945 )
Seat 7: WaveyDee ( $1115 )
Seat 8: acidboy_ ( $1000 )
Seat 9: WhiteFlagWar ( $1000 )
Seat 10: fussili ( $1980 )
Seat 5: May31 ( $990 )
Seat 1: MOOcNake ( $1000 )
Seat 4: KumarN ( $985 )
Trny:14943662 Level:1
Blinds(10/15)
** Dealing down cards **
Dealt to May31 [ 7h Td ]
WhiteFlagWar folds.
fussili folds.
MOOcNake raises [30].
SandroGrande folds.
KumarN folds.
May31 folds.
XoOPy folds.
WaveyDee raises [85].
acidboy_ folds.
MOOcNake will be using his time bank for this hand.
MOOcNake folds.
WaveyDee does not show cards.
WaveyDee wins 140 chips
Game #2555328256 starts.

#Game No : 2555315034
***** Hand History for Game 2555315034 *****
NL Texas Hold'em $50 Buy-in + $5 Entry Fee Trny:14943662 Level:1

[and so on...]


My thinking is that I want to use only one region and use a node and pattern for each field I want to transform. Is this right? What about nested types? The XML should look something like :

<Games>
<Game>
<Number>2555315034</Number>
<DateTime>August 18, 09:43:21 EDT 2005</DateTime>
<PlayerMap>
<Player>
<Name>SandroGrande</Name>
<Chips>985</Chips>
<Seat>3</Seat>
</Player>
<Player>
<Name>XoOPy</Name>
<Chips>945</Chips>
[and so on]

Are these rows within rows from the point of view of the Convert to XML process? How does this work?

Thanks in advance.

-Bobby

Posttop
Tony LavinioSubject: flatfile Convert to XML
Author: Tony Lavinio
Date: 22 Aug 2005 07:39 AM
Yes, you want to use one region and the pattern-matching.
But it will be a two-step process.

First, use Convert-to-XML to create the XML equivalent of the input
file.

Next, use the URL (adapter:whatever.conv?whatever.txt) as the INPUT
to XSLT or XQuery, and build your levels from there.

   
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.