Why are you attempting to talk yourself out of a good solution? Stores (both on-line and brick-and-mortar) use unique identifiers for their items. Things like part numbers and ISBN numbers make sure that when you order an item, the store knows exactly what you want. If you expect to have item names that are identical, how will you keep them straight, let alone your script, without a unique identifier?

However, if you insist on not having to set per-item ids, you can simply add an extra id field to each item as you convert it to html to display on your web interface. The item's location in the file(i.e. which number it is) could be the id. When you resubmit your form, you can use this number to make sure you are modifying the correct item. This assumes that only one person changes the file at a time(since adding an item could throw the count off.)

Later


In reply to Re: Item Identification in XML Files by pzbagel
in thread Item Identification in XML Files by Anonymous Monk

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.