in reply to •Re: Forcing XML to validate
in thread Forcing XML to validate

As I said, I have no control over what is generating the data. I would love to just pass this by, and not deal with the people that do, but unfortunatly that is not an option.

I am not trying to force XML::Simple to parse invalid XML. I am trying to throw away the invalid parts, so that there is only valid XML left.

Then everything will be good.

I was just wondering if there was already something out there to do this.

Replies are listed 'Best First'.
•Re^3: Forcing XML to validate
by merlyn (Sage) on Jul 02, 2004 at 11:23 UTC
    I'm not talking about control. I'm talking about cooperation. If someone is spitting out stuff that they think is XML, or advertised as XML, then it should be XML. Inform the folks generating the data that they need to do some work. That way, you're not trying to error-correct for them, which each consumer will have to do separately. Down That Path Lie Monsters and Madness, and is the very reason that nothing is XML until it is XML, unlike the HTML tag soup we had before it.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.