XML for Dummies

  • My project management software company had decided it would be best if
    our website design was contracted out to a company with more time on
    their hands and experience in design than our programmers working on the
    software a while back. The company we went with is extremely good at
    coming up with elegant company logos, business cards and website design,
    but we later found that they aren't very bright when it comes to the
    simplest kind of actual code (markup in this case).

    The website design they put together for us included a flash based menu
    navigation. This posed a problem whenever we needed to add, remove or
    change any of the items in the menu to reflect changes to the website. I
    knew that since they charged us by the hour, requesting some kind of
    external text configuration file for the menu would mean less hours they
    could claim on our bill as we could make changes for ourselves, but made
    the request anyway without any expectations. They had agreed not only to
    do so, but also to use an XML format I had requested for the
    configuration file if we ever wanted to write up our own tools to read
    in the configuration.

    The XML structure they gave us raised a few eyebrows:

    <?xml version="1.0" encoding="UTF-8"?>

    We could now change the URL of various menu items, but
    it didn't leave us open to add and remove items, or change the name of
    the menu items. I informed the company of these issues and they came
    back with a new version:

    <?xml version="1.0" encoding="UTF-8"?>
    <mainNavB>PRODUCT INFO</mainNavB>
    <subNavBb>PPM IN ACTION</subNavBb>
    <subNavCa>FREE UPDATES</subNavCa>
    <subNavCb>FREE DEMO</subNavCb>
    <subNavGa>BUY NOW</subNavGa>
    <subNavGb>MY ACCOUNT</subNavGb>

    Disclaimer: I know very little about flash, so maybe it's just possible the XML parsing abilities just made this a horrible task to implement along with variable numbers of flash elements, but I've seen some pretty amazing stuff done with flash that indicate otherwise.

  • Flash has no limits in that respect. It just imports the XML into a DOM type document, with all bells and whistles you'd want.

    This XML is crap,obviously.

    But I heard say that the Flash 6 XML parser was sliiiightly faster at reading attributes than text inside elements. We are now 2.5 versions further so who knows whether that still persists.

Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.