[Simple-support] Get element value with specific attribute value
Brought to you by:
niallg
|
From: Shay H. <sha...@to...> - 2012-04-29 10:13:56
|
Hi,
I have the following xml:
<a>
<b att1="1">bbbb</b>
<b att1="2">cccc</b>
</a>
How can I get the element "b" value with the attribute value "1" (bbbb).
I tried to configure the class "A" with the member "B" as below, but it
doesn't work.
public class A
{
@Element(name="B")
@Path("[@att1=\"1\"]")
private String B;
}
Any suggestions ?
10x,
Shay
|