[jdom-interest] Content as a Text Node (was JDOM JSR)
Elliotte Rusty Harold
elharo at metalab.unc.edu
Sat May 19 05:11:02 PDT 2001
At 11:27 PM -0500 5/18/01, Brett McLaughlin wrote:
>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);
>
>}
>
>
We also need clone(), toString(), hashCode() and equals().
I also think we need some sort of method to merge adjacent text nodes
so we produce an XPath compatible tree, but perhaps that method
belongs in the parent Element rather than in the Text class. Or
perhaps we could try to keep all text nodes merged all the time, in
which case we need some sort of insertAfter() and insertBefore()
methods here, but then CDATA gets real tricky. I need to think about
it some more.
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| The XML Bible (IDG Books, 1999) |
| http://metalab.unc.edu/xml/books/bible/ |
| http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://metalab.unc.edu/javafaq/ |
| Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/ |
+----------------------------------+---------------------------------+
More information about the jdom-interest
mailing list