[jdom-interest] XMLOutputter to the rescue (get/setText)

Richard Cook rpc at prismtechnologies.com
Thu Jul 12 14:16:55 PDT 2001


6 of one, 1/2 dozen of t'other. but I'm glad they didn't decide to do that
with "cat directory" when they designed unix.

-----Original Message-----
From: jdom-interest-admin at jdom.org [mailto:jdom-interest-admin at jdom.org]On
Behalf Of Elliotte Rusty Harold
Sent: 12 July 2001 16:20
To: 'JDOM Interest List'
Subject: RE: [jdom-interest] XMLOutputter to the rescue (get/setText)

At 3:52 PM +0100 7/12/01, Richard Cook wrote:
>I think java licensing makes it OK for the nuclear bit.
>but data oriented could be fooled by recursion:

No, I don't think they could be fooled. They always get what they ask for.

>  <group>
>    <entry>fred</entry>
>    <entry>jim</entry>
>  </group>
>traversing in a composite like way I find a node with "fred..jim" and nodes
>with "fred" and "jim"

If they ask for the text of a group, they get the text of that group. If
they ask for the text of an entry they get the text of that entry.

The question here really is predictability. If somebody does ask for the
text of group what do they expect to get? a string full of white space? or "
    fred
    jim
  "? I think it's the latter. They may be marginally surprised by the line
breaks, but that's easy to notice and normalize if it's a concern.
--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|              http://www.ibiblio.org/xml/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/     |
+----------------------------------+---------------------------------+
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com




More information about the jdom-interest mailing list