"Ah, but I was so much older then, I'm younger than that now."
My Boog Pages
Tuesday, October 4
King's X(ML) - Updated
I haven't blogged about it much, but I've spent quite a bit of time this year programming (a lot more than I've spent writing). I've gotten a couple of projects off the ground, notably the Amazon remote shopping cart at Bleeker Books, and I have one more Big Idea that I'd like to get rolling before the end of the year.
But the Big Idea requires the Little Idea as a prerequisite. And that's where I've run into trouble.
Background: Most of my projects use XML, and specifically generate XML documents from data stored in an Access database (in theory I could use any OLE-compatible database). The definitions that control how the data is retrieved are themselves stored in XML documents, and until now I've been reading data from those documents whenever I needed to grab a definition.
It occurred to me that there was a fairly simple way to store the definitions in memory, and over the past month or so I've been making that happen. Once I'm done I'll be able to use this toolkit to implement the Big Idea.
So I finished the code that reads the configuration, and that extracts XML from the database in various forms, and rewrote much of the other code to comply, and by last night I was ready to work on the code that saves an XML document back to the database. So I extracted a doc, made a couple of changes, and stuffed it back to Access. And here our story gets interesting (to me).
Turns out that in previous versions, the XML I was pulling out was not the same as the XML I was putting back. I had an editor in the middle, and when the user clicked a button it POSTed a form back to the web site. But when the site turned the form fields back into XML, some parts of it were stored as text - easier to deal with, for sure, but not what I was getting out of the database.
When I'm working on my own documents that's not really a problem, but in the future I expect to import XML from other sources (RSS. There, I've said it.) and I need to be able to use the same code. *Sigh*. No rest for the weary.
Update, 7:54pm. Finished up the new code, and it worked as expected - which means the save function still isn't working right. I know how to fix it, but it would involve a lot more work, and since I'll only need to save text, not XML, in the new project, I won't need it for a while.
Cowboys Update. So, how'd the 'Boys in blue do this week? Can't run the ball? Check! Can't stop the run? Check! Gives up the long bomb? Check! The only thing they did better against the Raiders was avoiding the big turnover, and that wasn't enough to pull out the win. And if Terry Glenn had come up with Drew Bledsoe's fastball in the dirt, we'd be talking about how the Cowboys had pulled out another one.
I was glad they lost. They didn't deserve to win. Despite having Parcells as the coach, this team is undisciplined and prone to making mistakes at the wrong time. They are 2-2 because they never stop playing, not because they play well. I expect a 4-4 first half, then a crash to 6-10 for the year. Not good times in Dallas.