Index: xo/src/java/org/apache/commons/xo/Mapper.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/xo/src/java/org/apache/commons/xo/Mapper.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Mapper.java
--- xo/src/java/org/apache/commons/xo/Mapper.java	16 Apr 2002 19:07:56 -0000	1.1.1.1
+++ xo/src/java/org/apache/commons/xo/Mapper.java	4 May 2002 12:31:34 -0000
@@ -438,7 +438,7 @@
                     // (3):   <city>Guelph</city>                +- (A)
                     // (4):   <country>Canada</country>          |
                     // (5): </address>                        ---+
-                    if (hasChildren(node) && !containsCDATA(node))
+                    if (!isTextOnly(node))
                     {
                         debug("Node " + node.getName() + " has children");
 
@@ -654,6 +654,16 @@
     private boolean hasChildren(Node node)
     {
         return (((Element) node).nodeCount() > 1);
+    }
+
+    /**
+     * Does the node in question have only text?
+     *
+     * @param node The element to check for children.
+     */
+    private boolean isTextOnly(Node node)
+    {
+        return ((Element) node).isTextOnly();
     }
 
     /**

