XML - I finally get it!

| | Comments (0)

Work on my museum kiosk project sort of ground to a halt for a while. I was about half done with it, and didn't want to go any further till they got me some content. I know how an interface can change once the content starts rolling in. I recently visited the guys in charge and they were pretty happy with my progress so far. I switched the kiosk interface from being text file based to XML. This should allow them to eventually go to a server-based Filemaker Pro database to serve up the content for the kiosk.

Just to quickly get something to show them, I made separate Filemaker files for each of the first few letters of the alphabet. This, I know, wasn't the best approach in the longrun. Even though it was easier than flat text files it was still pretty unwieldy to have 26 separate files. I did a web tutorial last week on XML and integration into Flash and gained a much better understanding of what I could do with it. By adding a few more fields in the FileMaker database and exporting a different way, I figured that I should be able to slice and dice all the info any way I want using a single FileMaker database. This would be a great time saver for the museum in regards to upkeep.

The tricky part was that the info has to but sliced up in 3 different ways: Print media (writers and photographers), radio, and TV. Some people do more than one thing. It would be easy to make a separate FileMaker DB for each, but I found a good way to just combine them all. I put a field in the DB for Print, one for Radio, and one for TV. If the person is associated with any of these media, I put a "Y" (yes) in the field. In Flash when I load the frame for Radio personnel, for example, I'll just have it make an array of all the people who have a Y in the Radio field. From there, I can sort by last name. Pretty simple and I didn't need XPath to do it, either. What I learned about XML is that it will create an array of nodes automatically if you ask it for all the childNodes at a given level of the XML file. I was able to easily home in on the data I needed once I understood this concept. XML had always sort of escaped me before, but now I can really appreciate what you can do with it. I can be thick as a brick about a lot of coding concepts, but once I finally get it, it is always worth the extra effort.

Leave a comment

About this Entry

This page contains a single entry by PATRICK JOSEPH BESONG published on July 24, 2007 8:50 AM.

My visit to Hershey was the previous entry in this blog.

New Touch-screen Kiosk for PSU All-Sports Museum is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.24-en