[XOM-interest] How do you get CDATA types within a text element?

Elliotte Harold elharo at metalab.unc.edu
Thu Jan 8 23:34:20 EST 2009


lenards at email.arizona.edu wrote:

> But I've been asked to put CDATA sections around the inner-text (even though
> I've been told that's not really the correct approach anymore, escaping is).
> 
> I would expect that there might be a way to control or override the Text class's
> behavior.  Or extend it.  Or maybe I can't.  I know that XOM is lightweight, and
> well-designed, so maybe this use case isn't supported because it's a bad
> approach.

Exactamundo. Proper XML processing neither knows nor cares whether CDATA 
sections are used. It's an irrelevant detail of syntax.

-- 
Elliotte Rusty Harold  elharo at metalab.unc.edu
Refactoring HTML Just Published!
http://www.amazon.com/exec/obidos/ISBN=0321503635/ref=nosim/cafeaulaitA


More information about the XOM-interest mailing list