how I put condition for two attribute in Xpath?



how I can get PointLocation by Xpath PointBrush which content exactly x and y. Not: I write Xpath inside My java.


My Xpath:



NodeList brushNode="PointBrush/PointLocation[x['" + entity.getPointLocation().getX() + "'] | /y['" + entity.getPointLocation().getY() + "']]"


my XMl:



<PointBrush>
<PointLocation>
<x>36.473796987533674</x>
<y>35.49325534870742</y>
</PointLocation>
</PointBrush>
<PointBrush>

<PointBrush>
<PointLocation>
<x>36.4723496987533674</x>
<y>35.1234534870742</y>
</PointLocation>
</PointBrush>
<PointBrush>

No comments:

Post a Comment