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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to