[jdom-interest] Content as a Text Node (was JDOM JSR)

skeens skeens at mobile.rogers.com
Sat May 19 07:29:16 PDT 2001


I'm not sure what the benefit would be from the Text class.  It doesn't derive from a common base class so I would still have to test its type if I get in a list of mixed content. So, apart from having a class that encloses String or CDATA there is no real benefit.

-----Original Message-----
From: "Brett McLaughlin" <brett at newInstance.com>
Date: Fri, 18 May 2001 23:27:48 -0500
To: <jdom-interest at jdom.org>
Subject: RE: [jdom-interest] Content as a Text Node (was JDOM JSR)

Proposed text node:

public class Text {

    public Element getParent();

    public String getValue();

    public void setValue(String value);

    // These are being discussed
    public boolean isCDATA();

    public void setCDATA(boolean isCDATA);

}


This should be public, because when invoking getMixedContent(), you will
want to do checks on it, and possibly use them.

-Brett

> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of wes at tralfamadore.com
> Sent: Friday, May 18, 2001 3:56 PM
> To: jdom-interest at jdom.org
> Subject: RE: [jdom-interest] Content as a Text Node (was JDOM JSR)
>
>
>
> Brett,
>
> Can you float the proposed interface for Text?
>
> Other than getParent() and some ability to note
> current view criteria (CDATA vs. plaintext), what's in
> it?
>
> Is there a case to make it a (private) inner class, or
> will developers need to instantiate new Text() objects
> directly?
>
> Wes
>
> --- Brett McLaughlin <brett at newInstance.com> wrote:
> > Agreed. However, I think that we can be careful in
> > how we say that; for
> > instance, saying that "all element content is stored
> > as a Text node" is not
> > good. However, we can say (truthfully) "You can
> > directly get an element's
> > content as a String, without having to deal with a
> > Text node class." This is
> > the advantage people want, I think; the detail of
> > how it's stored
> > internally, or that you CAN get it in a Text node,
> > is really irrelevant to
> > most people, I think.
>
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yourad
dr at yourhost.com

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list