First, do you really want to use XML? ;-) On one hand, it's great in that it's entirely cross-platform (and here I refer to languages more than hardware). On the other hand, it's overly verbose, and uses up way too much memory.

If you're doing this in perl anyway, YAML may be a better/smaller/faster choice. It'll mostly limit you to perl - should you want to reimplement in another language, you'll need to reimplement something (either YAML in that other language, or convert everything to XML for perl).

As for your stumbling block ... yes, that is always something that has confused me, too. Especially when <spell name="sleep>...</spell> is so much shorter than <spell><name>sleep</name>...</spell>. Good luck :-)


In reply to Re^3: CRPGs, Perl, Gtk2, and my vision by Tanktalus
in thread CRPGs, Perl, Gtk2, and my vision by japhy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.