in reply to Re: (jeffa) Re: An ampersand is not well-formed XML data?
in thread An ampersand is not well-formed XML data?

Okay, right on. The problem now is where I should do the encoding. XML::Parser bombs out and dies as soon as it sees the ampersand, before it gets passed to the handler.
It needs to get done before it ends up as so-called XML. It's not XML if the encoding hasn't been done. Go upstream and fix the problem there. If you are getting files in that format, scream at the provider. For them to call it XML is doing a disservice to the meaning of what XML's about.

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: Re: (jeffa) Re: An ampersand is not well-formed XML data?

Replies are listed 'Best First'.
Re: Re: Re: (jeffa) Re: An ampersand is not well-formed XML data?
by donfreenut (Sexton) on Apr 30, 2001 at 21:18 UTC

    I will go scream at nate, but I don't think he'll listen to me :)

    Anyway, are you saying that the Everything Engine should be encoding the special characters into HTML entities before spitting them out as XML?

    ---
    donfreenut
      Anyway, are you saying that the Everything Engine should be encoding the special characters into HTML entities before spitting them out as XML?
      Precisely. It's not XML unless it's well-formed XML. That's the definition! If something is spitting out bad non-XML, then get them to fix it. The whole point of XML is that if everyone plays by the rules, it's all clean and easy.

      -- Randal L. Schwartz, Perl hacker