Skip to Content.
Sympa Menu

xom-interest - RE: [XOM-interest] Convenience methods for adding text in ParentNode

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael Fitzgerald" <mike AT wyeast.net>
  • To: "Elliotte Rusty Harold" <elharo AT metalab.unc.edu>
  • Cc: "XOM" <xom-interest AT lists.ibiblio.org>
  • Subject: RE: [XOM-interest] Convenience methods for adding text in ParentNode
  • Date: Tue, 22 Oct 2002 06:33:37 -0700

Also, hasChildren() could go to Element. If Document has no Element child,
you have no document anyway.

-Mike

> -----Original Message-----
> From: xom-interest-admin AT lists.ibiblio.org
> [mailto:xom-interest-admin AT lists.ibiblio.org]On Behalf Of Elliotte Rusty
> Harold
> Sent: Sunday, October 20, 2002 1:09 PM
> To: xom-interest
> Subject: [XOM-interest] Convenience methods for adding text in
> ParentNode
>
>
> ParentNode contains a couple of methods that automatically convert a
> String to a text node; e.g.
>
> public final void insertChild(int position, String text) {
> public final void appendChild(String text) {
>
> It occurred to me that since you can't actually add a text node to a
> Document, perhaps these should be pushed down to Element instead.
> Thoughts?
>
> The real question is whether there's any use-case that requires
> adding text content to a node whose type is known only as ParentNode.
> Off the top of my head I can't think of one; and even if there is, it
> still be possible to do parent.appendChild(new Text("some string"))
>
>
> --
> Elliotte
>
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>





Archive powered by MHonArc 2.6.24.

Top of Page