From: Bob Hutchison Date: 2006-03-18T19:57:33+09:00 Subject: Re: Double Quotes in XML On Mar 17, 2006, at 7:22 PM, Mark Volkmann wrote: > On 3/17/06, Bob Hutchison wrote: >> >> On Mar 17, 2006, at 3:33 PM, gparsons wrote: >> >>> I'm trying to do something similar to the following: >>> >>> >>> >>> >>> Foo must equal "bar". >>> Foo = "bar" >>> >>> >> >> This is well-formed XML. > > I think it's not well-formed because the Code element contains text > with unescaped double-quotes. If you change them to " then it's > well-formed. It isn't really a matter of opinion, and you are nowhere near lazy enough :-) Run it through a validator. Both rxp and xmllint believe that it is OK. That is not to say that it wouldn't be better to escape those three characters ( quot, apos, and gt -- you *must* escape lt and amp) -- there's a lot of buggy software out there, and a little prevention can save you lots of trouble. . Cheers, Bob > > -- > R. Mark Volkmann > Object Computing, Inc. > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- Raconteur -- xampl for Ruby --