[jdom-interest] CDATA class
    bob mcwhirter 
    bob at werken.com
       
    Fri Apr  5 13:17:36 PST 2002
    
    
  
On Fri, 5 Apr 2002, Jason Hunter wrote:
> > I'm working up my JDOM notes for SD2002 next month. A couple of quick
> > questions:
> > 
> > 1. At various times it's been suggested that CDATA be made a subclass of
> > Text. Has there been a final decision on that one way or the other? If
> > nothing else making CDATA a subclass of text would:
> >   A. Make the codebase smaller
> >   B. Make JDOM simpler for programmers who don't care about CDATA
> > sections. They could just treat them like any other text node.
> >   C. Be a little closer to the infoset model.
> 
> I believe that makes perfect sense.
Another suggestion that's been offered (by me, I think) is simply a
flag on Text to indicate if this particular text node should be
treated as a CDATA or not.  Use-case is it makes it easier for
someone to turn a non-CDATA text node into a CDATA text node without
having to create a new object.  Mostly useful, I guess, for outputting
contructed models.
	-bob
    
    
More information about the jdom-interest
mailing list