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

Brett McLaughlin brett at newInstance.com
Fri May 18 21:27:48 PDT 2001


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




More information about the jdom-interest mailing list