You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by na...@apache.org on 2008/03/28 07:24:59 UTC

svn commit: r642096 - /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ChildNode.java

Author: nandana
Date: Thu Mar 27 23:24:57 2008
New Revision: 642096

URL: http://svn.apache.org/viewvc?rev=642096&view=rev
Log:
When the child is the document element get parent must owner node

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ChildNode.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ChildNode.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ChildNode.java?rev=642096&r1=642095&r2=642096&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ChildNode.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ChildNode.java Thu Mar 27 23:24:57 2008
@@ -89,7 +89,12 @@
     }
 
     public OMContainer getParent() throws OMException {
-        return this.parentNode;
+        if(parentNode != null) {
+            return this.parentNode;
+        } else {
+            //This is the case where this child is the document element
+            return this.ownerNode;
+        }
     }
 
     public Node getParentNode() {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org