Are XPath expressions such as the following in MOXy?
field[XMLtag!='identifier']
In principle, I have such XML
<demographics>
<field>
<value>12345</value>
<XMLtag>identifier</XMLtag>
</field>
<field>
<value>somename</value>
<XMLtag>name</XMLtag>
</field>
</demographics>
I try to get a list to populate, but exclude the field, which is for the identifier.
This will work, but gives me all the elements of field (2) in List(correctly)
@XmlElement( name = "field" )
public List<Field2> fieldList;
It won't be, I get empty List
@XmlPath( "field[XMLtag!='identifier']" )
public List<Field2> fieldList;
Should the above work, or expressions that are not supported by MOXy? I can not find information about them.
I did not include my Field2 class, as it is very simple and obviously works fine, since I can expand the list using annotation @XmlElement. Let me know if you want to see it.
source
share