XML::Smart and XML::Simple doesn't follow any DTD to read a XML!

What I say that is crazy, is the use of <list> in 2 ways, that I don't think that can be defined well with a DTD.

Also you really need to take care with typos. in XML, foo-bar, is very different of foobar, that is different of FOOBAR! Soo, when I saw list-item, and listitem, for me as a XML tag, they are things different, but only similar in the name. So, the structure that I suggest in the end, is based in the same tree structure sent in the main post, where yes, it has a list with items and sub lists inside it, since I won't judge that structure, I'm only judging the use of similar names for tags and use of the same name, <list>, in different ways.

And don't forget that without "following standard practices and proper XML design." you don't have a real XML, for the real purpose of XML, be a standart format. And without a real XML you just don't need XML, you can use better things to declare a tree.

Good luck!

Graciliano M. P.
"Creativity is the expression of the liberty".


In reply to Re: Re: Re: Text to XML by gmpassos
in thread Text to XML by murugu

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.