Re: [xml] local name / localname /prefix

Ulrich Staudinger wrote:

i use libxml2-2.5.4 and i have some xml tags:

<env:body xmlns:m="somens">

is there a way to access the local name of an element? in xmlNode* i
can't find any pointer to get hold of the "m".

m is not the localname, it is the namespace prefix. You can access it through node->ns->prefix. But note that only the URI is really meaningful (i.e node->ns->href), since the prefix is only syntaxic sugar.


Fabrice Desré
France Télécom R&D/DTL/TAL
Tél: +(33) (0)2 96 05 31 43
Fax: +(33) (0)2 96 05 39 45

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]