Horse Racing Forum - PaceAdvantage.Com - Horse Racing Message Board

Go Back   Horse Racing Forum - PaceAdvantage.Com - Horse Racing Message Board


View Single Post
Old 08-09-2020, 05:55 PM   #18
Jeff P
Registered User
 
Jeff P's Avatar
 
Join Date: Dec 2001
Location: JCapper Platinum: Kind of like Deep Blue... but for horses.
Posts: 5,258
Quote:
Originally Posted by classhandicapper View Post
I don't understand why you went through all this.

I just download the XML file, open it in excel, it gets translated and puts each field into neat columns with headings, and then I import it into my database. It literally takes me a minute. I do it once late morning when the east coast tracks I might play come in and then once later in the day if I am going to play west coast tracks.

Where I've had huge difficulty is with the Timeform API. No matter what I did I couldn't translate the XML in a similar fashion and I'm way too lazy at this point to learn how to do it or write a parser. So I threw in the towel.

I find text files way easier to work with anyway.
I agree that text files are far easier to work with.

However, one of the reasons I initially decided to parse the xml file was that upper management at Equibase assured me they were committed to using xml and that the basic structure of the xml would be permanent.

No. Not permanent forever. But permanent as much as any piece of technology can reasonably be expected to remain intact in this day and age.

There would always be a track node, a node for each race, and inside of each race node the individual scratch nodes for each of the scratched horses in that race, etc.

That was important to me. Before Equibase introduced the scratches and changes xml, I was parsing scratches and changes from the individual .html pages at the Brisnet Supertote site.

It seemed like Brisnet was constantly making html changes and breaking my code. (No bueno.)

A second reason I decided to parse the xml file instead of the individual files or .html pages was that the xml file contains scratches and changes for every track running each day.

That simplified things for me.

All I had to do was write a program to parse one simple xml file over and over each day.

For me this was actually easier than managing navigation events to and parsing events of (say) dozens of individual files or .html pages. (Separate files or .html pages for each of the many tracks running each day.)

Also, back in the beginning, upper management at Equibase told me the reason they were developing the xml file in the first place was to create a single source where not just horseplayers but everybody in the industry could go for scratches and changes constantly updated in something that approaches real time.

Then there's this, which is basically correct:
Quote:
Originally Posted by headhawg View Post
Jeff may have needed to use it programmatically. He couldn't tell his users to use Excel, save the file, and then import into JCapper. If it was for personal use, sure, use Excel. But coders like to code.
All of that was enough to convince me to invest in the coding hours needed to parse the xml file.


-jp

.
__________________
Team JCapper: 2011 PAIHL Regular Season ROI Leader after 15 weeks
www.JCapper.com

Last edited by Jeff P; 08-09-2020 at 06:08 PM.
Jeff P is online now   Reply With Quote Reply
 
» Advertisement
Powered by vBadvanced CMPS v3.2.3

All times are GMT -4. The time now is 02:43 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 1999 - 2023 -- PaceAdvantage.Com -- All Rights Reserved
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program
designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.