xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
[XOM-interest] Convenience methods for adding text in ParentNode
- From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
- To: xom-interest <xom-interest AT lists.ibiblio.org>
- Subject: [XOM-interest] Convenience methods for adding text in ParentNode
- Date: Sun, 20 Oct 2002 16:08:33 -0400
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] Convenience methods for adding text in ParentNode,
Elliotte Rusty Harold, 10/20/2002
-
RE: [XOM-interest] Convenience methods for adding text in ParentNode,
Michael Fitzgerald, 10/22/2002
- RE: [XOM-interest] Convenience methods for adding text in ParentNode, Elliotte Rusty Harold, 10/22/2002
-
[XOM-interest] Siblings,
Elliotte Rusty Harold, 10/22/2002
-
Re: [XOM-interest] Siblings,
Bradley S. Huffman, 10/22/2002
- RE: [XOM-interest] Siblings, Hallvard Trętteberg, 10/23/2002
- Re: [XOM-interest] Siblings, Elliotte Rusty Harold, 10/24/2002
-
Re: [XOM-interest] Siblings,
Bradley S. Huffman, 10/22/2002
- RE: [XOM-interest] Convenience methods for adding text in ParentNode, Michael Fitzgerald, 10/22/2002
-
RE: [XOM-interest] Convenience methods for adding text in ParentNode,
Michael Fitzgerald, 10/22/2002
Archive powered by MHonArc 2.6.24.