Re: [xml] Can I read namespace URIs as regular attributes?
- From: Michael Ludwig <mlu as-guides com>
- To: xml gnome org
- Subject: Re: [xml] Can I read namespace URIs as regular attributes?
- Date: Thu, 03 Sep 2009 11:49:33 +0200
Jianqing Zhang schrieb:
Thanks Michael. I'm using C++ and have not figured it out. I'm
wondering how I can get these namespace URIs.
It sure is possible.
print $_->name, "\t", $_->value, "\n"
for $doc->documentElement->getNamespaces;
print $_->name, "\t", $_->value, "\n"
for $doc->documentElement->attributes;
Take a look at the Perl bindings. You can download the tarball here:
http://search.cpan.org/~pajas/XML-LibXML-1.69/
For example, xpath.c uses a function called xmlGetNsList.
--
Michael Ludwig
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]