changeset 3505:637d114232b2

Don't use XPath Query to get attribute of a XML Node flys-client/trunk@5257 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Fri, 24 Aug 2012 10:52:27 +0000
parents 1387cdeb8d93
children f2a4e6e92ffd
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/server/auth/UserClient.java
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Fri Aug 24 10:49:23 2012 +0000
+++ b/flys-client/ChangeLog	Fri Aug 24 10:52:27 2012 +0000
@@ -1,3 +1,8 @@
+2012-08-24	Björn Ricks <bjoern.ricks@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/server/auth/UserClient.java:
+	  Don't use XPath Query to get attribute of a XML Node
+
 2012-08-24	Björn Ricks <bjoern.ricks@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/server/auth/DefaultUser.java,
--- a/flys-client/src/main/java/de/intevation/flys/client/server/auth/UserClient.java	Fri Aug 24 10:49:23 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/auth/UserClient.java	Fri Aug 24 10:52:27 2012 +0000
@@ -37,9 +37,10 @@
             return false;
         }
         for(int i=0; i < users.getLength(); i++) {
-            Node usernode = users.item(i);
-            String name = XMLUtils.xpathString(
-                usernode, "@art:name", ArtifactNamespaceContext.INSTANCE);
+            Element usernode = (Element)users.item(i);
+            String name = usernode.getAttributeNS(
+                    ArtifactNamespaceContext.NAMESPACE_URI, "name");
+
             if (name.equals(user.getName())) {
                 return true;
             }

http://dive4elements.wald.intevation.org