On Mar 17, 2006, at 7:22 PM, Mark Volkmann wrote:

> On 3/17/06, Bob Hutchison <hutch / recursive.ca> wrote:
>>
>> On Mar 17, 2006, at 3:33 PM, gparsons wrote:
>>
>>> I'm trying to do something similar to the following:
>>>
>>> <?xml version="1.0" encoding="utf-8"?>
>>> <Rules id="ruleset1">
>>>   <Rule num="1">
>>>     <Description>Foo must equal "bar".</Description>
>>>     <Code>Foo = "bar"</Code>
>>>   </Rule>
>>> </Rules>
>>
>> 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 &quot; 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 <http://www.recursive.ca/ 
hutch/>
Recursive Design Inc.          -- <http://www.recursive.ca/>
Raconteur                      -- <http://www.raconteur.info/>
xampl for Ruby                 -- <http://rubyforge.org/projects/xampl/>