I am writing a nasty parser to translate news stories from our legacy news story system (ATEX) to NITF XML files. The data that I get from ATEX is inconsistent (to put it mildly), so my parsing is a bit complicated.

In some cases, it is much easier for me to translate commands directly into NITF XML tags directly in the text. As a simple example, I translate e-mail and web addresses to their tag notations. However, XML::Writer automatically escapes special characters.

My question: XML::Writer uses IO for writing the actual XML file. Is it safe for me to go behind XML::Writer's back and use the IO object directly to write my data, tags and all? Note, by safe, I mean "XML::Writer won't puke,", not safe as in "My XML file is guaranteed to be well-formed."

In reply to Using XML::Writer to create NITF files, but some tags exist in my data. by joealba

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.