You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2011/11/13 10:25:07 UTC
svn commit: r1201414 -
/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/DocumentNavigator.java
Author: veithen
Date: Sun Nov 13 09:25:06 2011
New Revision: 1201414
URL: http://svn.apache.org/viewvc?rev=1201414&view=rev
Log:
Some minor code simplifications.
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/DocumentNavigator.java
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/DocumentNavigator.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/DocumentNavigator.java?rev=1201414&r1=1201413&r2=1201414&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/DocumentNavigator.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/DocumentNavigator.java Sun Nov 13 09:25:06 2011
@@ -85,8 +85,7 @@ public class DocumentNavigator extends D
* @return Returns the name of the element node.
*/
public String getElementName(Object object) {
- OMElement attr = (OMElement) object;
- return attr.getQName().getLocalPart();
+ return ((OMElement) object).getLocalName();
}
/**
@@ -103,7 +102,7 @@ public class DocumentNavigator extends D
prefix = namespace.getPrefix();
}
if (prefix == null || "".equals(prefix)) {
- return attr.getQName().getLocalPart();
+ return attr.getLocalName();
}
return prefix + ":" + namespace.getNamespaceURI();
}
@@ -126,8 +125,7 @@ public class DocumentNavigator extends D
* @return Returns the name of the attribute node.
*/
public String getAttributeName(Object object) {
- OMAttribute attr = (OMAttribute) object;
- return attr.getQName().getLocalPart();
+ return ((OMAttribute) object).getLocalName();
}
/**
@@ -140,7 +138,7 @@ public class DocumentNavigator extends D
OMAttribute attr = (OMAttribute) object;
String prefix = attr.getNamespace().getPrefix();
if (prefix == null || "".equals(prefix)) {
- return attr.getQName().getLocalPart();
+ return attr.getLocalName();
}
return prefix + ":" + attr.getNamespace().getNamespaceURI();
}