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
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext 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.

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 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.