Forum Moderators: open

Message Too Old, No Replies

optimal XML structure for importing into FlashMX 2004

         

mgm_03

3:45 am on Jun 8, 2006 (gmt 0)

10+ Year Member



I would like to know if there is a preferred or optimal structure for XML documents when importing into FlashMX2004. For example, sometimes XML documents use attributes pretty liberally within the element tags. In my sample below, I did not. However, I could have. What difference would it make? Which approach makes parsing easier?

<?xml version="1.0" encoding="iso-8859-1"?>
<calendar>
<event>
<date>June 10</date>
<time>10am to 4pm</time>
<venue>Acme</venue>
<details>All work and no play makes Jack a dull boy.</details>
<location>1234 AnyStreet, MyTown, TX</location>
<link><a href="http://yourdomain.com"</link>
</event>
<event>
<date>June 12</date>
<time>9am to 4pm</time>
<venue>SuperSaver</venue>
<details>All work and no play makes Jack a dull boy.</details>
<location>4321 Some Street, SomeTown, TX</location>
<link><a href="http://somedomain.com"</link>
</event>
</calendar>

oxbaker

5:59 pm on Jun 15, 2006 (gmt 0)

10+ Year Member



it really doesnt matter, i find that using attributes is harder than not, but just develop your parsing engine to follow one format and stick with it. The way you have this structured is pretty good. Perhaps looking at XML Schemas may help you in the future.

hth,
mcm