I have the following XML Schema:
<children>
<component library="xml">
<properties Output="1"/>
<data>
<root scrollposition="1">
<entry name="Demo" expanded="1">
<entry name="Subentry">
</entry>
</entry>
</root>
</data>
</component>
<component library="xml">
<properties/>
<data>
<root scrollposition="1">
<entry name="Demo" expanded="1">
<entry name="Subentry">
</entry>
</entry>
</root>
</data>
</component>
</children>
Now i want to get Entries where the Value of the Attribute library
is xml
and the Value of the Attribute Output
in the Element properties
is 1
.
My class is the following:
public class Component {
@XmlPath("component[@library='xml' and properties[@Output='1']]/data/root/entry")
private List<Entry> entries;
public List<Entry> getEntries() {
return entries;
}
public void setEntries(List<Entry> entries) {
this.entries = entries;
}
}
But the List is null. I think something in the Annotation 'XmlPath' is wrong but i don't now whats wrong.