in reply to Re: regex on XML
in thread regex on XML

That's not true. You do have to encode ' and " if you expect to use them inside a quoted string using that character as a delimiter. So <foo bar=" &quot; "/> and <foo bar=' &apos; '/>

Replies are listed 'Best First'.
Re: Re: Re: regex on XML
by CountZero (Bishop) on Feb 17, 2004 at 22:57 UTC
    Perhaps, but it has nothing to do with it being valid XML or not: it is just about having balanced quotes.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

      Yes it is - if you don't encode apostrophes inside an apostrophe quoted string your XML is immediately invalid. Same thing for double-quotes.
        Well I guess it is just a matter of semantics: XML does not need single and double quotes encoded, but it needs them balanced. Either way the XML is "bad".

        Most of the time you can get away with the encoding by putting single quotes within double quotes and vice versa.

        CountZero

        "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

          A reply falls below the community's threshold of quality. You may see it by logging in.