Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/auth/UserClient.java @ 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 | 06d999e95615 |
children | f2a4e6e92ffd |
comparison
equal
deleted
inserted
replaced
3504:1387cdeb8d93 | 3505:637d114232b2 |
---|---|
35 | 35 |
36 if (users == null || users.getLength() == 0) { | 36 if (users == null || users.getLength() == 0) { |
37 return false; | 37 return false; |
38 } | 38 } |
39 for(int i=0; i < users.getLength(); i++) { | 39 for(int i=0; i < users.getLength(); i++) { |
40 Node usernode = users.item(i); | 40 Element usernode = (Element)users.item(i); |
41 String name = XMLUtils.xpathString( | 41 String name = usernode.getAttributeNS( |
42 usernode, "@art:name", ArtifactNamespaceContext.INSTANCE); | 42 ArtifactNamespaceContext.NAMESPACE_URI, "name"); |
43 | |
43 if (name.equals(user.getName())) { | 44 if (name.equals(user.getName())) { |
44 return true; | 45 return true; |
45 } | 46 } |
46 } | 47 } |
47 return false; | 48 return false; |