How to retrieve value of an attribute which contains colon in the attribute name using xpath How to retrieve value of an attribute which contains colon in the attribute name using xpath android android

How to retrieve value of an attribute which contains colon in the attribute name using xpath


To get the value of the attributes you could use:

/a/aff/@*[name()='xml:id']


/a/aff/@xml:id works just fine in getting the values...

Are you trying to get both values?

If you are trying to get just the first value you could use /a/aff[1]/@xml:id