[jdom-interest] Re: Radical Suggestion

Elliotte Rusty Harold elharo at metalab.unc.edu
Mon Jul 29 09:15:54 PDT 2002

At 5:41 PM +0200 7/29/02, Laurent Bihanic wrote:

>Yet the JDOM API could offer methods to make the developers work simpler.
>For example, Element could support methods 
>getChild/getChildren(String name, boolean ignoreNamespace) to match 
>child nodes in any namespace or a constructor Element(String name, 
>boolean inheritParentNs) to create elements that will automatically 
>inherit the namespace of their parent node whenever attached to a 
>new parent.
>These methods will never be used internally when building documents 
>from text XML documents but could prove useful to many.

Who? What use-case could you possibly have for such a thing? How 
often do you actually want to match a local name in any namespace? I 
do not believe this is in any way helpful. In fact, I think it's 
actively harmful.

The only people I hear asking for this functionality are developers 
who don't actually understand how namespaces work. JDOM should not 
help them to continue their misunderstanding. Instead, it should 
point them in the right direction.

| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
|          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
|              http://www.cafeconleche.org/books/xian2/              |
|  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |

More information about the jdom-interest mailing list