java - How to retrieve value of an attribute which contains colon in the attribute name using xpath -
i have simple requirement in need fetch value of attribute xml:id i.e af1. making use of saxparser , here xpath:a/aff/@xml:id on contrary able fetch value of using xpath:a/aff/@value.
but unable retrieve value please me?
<?xml version="1.0" encoding="utf-8" ?> <a> <aff xml:id="af1" value="a"> <uaff> hello </uaff> </aff> <aff xml:id="corr1"> <uaff> hello1 </uaff> </aff> </a> thanks in advance.
to value of attributes use:
/a/aff/@*[name()='xml:id']
Comments
Post a Comment