Dealing with xpath using libxml


I m trying to generate a xslt file from xhtml using libxml and when I m
parsing the xhtml file and look at xpaths i get something ugly like :


I tried to do the same with REXML and i obtained :


When I m parsing xml files it works fine, but with xhtml files xpaths
are really ugly.

Does anyone know how to get nicer xpaths with libxml ?

Thanks for your answers