I have a number of variable types, such as:
abc1A, abc1B, abc3B, ... xyz1A, xyz2A, xyz3C, ... data1C, data2A, ...
It is saved in various xml formats:
<area name="DataMap"> <int name="number" nullable="true"> <case var="abc2,abc3,abc5">11</case> <case var="abc4,abc6*">8</case> <case var="data1,xyz7,xyz8">22</case> <case var="data3A,xyz{9},xyz{5A,5B,5C}">24</case> <case var="xyz{6,4A,4B,4C}">20</case> <case var="other01">15</case> </int> </area>
I hope to request to which instance, for example, xyz5A, for example, to cards. The request should return 24, but I do not know in advance if its reference in the xml node is explicit, as in "xyz4A", or using a wildcard such as "xyz4 *", or in curly brackets, as indicated above.
These are the queries for the rows in this row and will successfully return the result:
xpath '/area[@name="DataMap"]/int[@name="number"]/case[contains(@var,"xyz")][contains(@var,"5A")]'
But it also returns a hit for data5A, which is not wrong:
xpath '/area[@name="DataMap"]/int[@name="number"]/case[contains(@var,"data")][contains(@var,"5A")]'
Are there xpath / other query constructors that parse inconsistent (but valid) xml above? It seems I can only request explicit string matches compared to wildcard and curly formatted formats.