Oh my! Not again!

If what you get is really what you describe, then do yourself (and your text-in-pointy-brackets provider) a favor: don't call it XML. And write (or have your povider write) a hundred times "If it does not parse, then it is NOT XML" Whether the reason is messed up tags, an encoding problem or anything else, they have no business calling it XML if an XML parser doesn't say that it is well-formed.

Once you have realized this, it then makes sense that, as you are not processing XML, you cannot use XML tools. At least not directly You need first to convert the data you get into real XML, or even better, have the source provide real XML, make sure it is OK by parsing it, and then you can use an XML module.


In reply to Re: Re: Re: XML::Parser question by mirod
in thread XML::Parser question by primus

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.