Re: [xml] Can I read namespace URIs as regular attributes?

2009-09-07 Thread Daniel Veillard
On Sun, Sep 06, 2009 at 04:53:14PM +0200, Emmanuel Rodriguez wrote: > On Thu, Sep 3, 2009 at 12:39 AM, Jianqing Zhang > wrote: > > > Thanks Michael. I'm using C++ and have not figured it out. I'm > > wondering how I can get these namespace URIs. information > > > > The following xpath expression

Re: [xml] Can I read namespace URIs as regular attributes?

2009-09-06 Thread Emmanuel Rodriguez
On Thu, Sep 3, 2009 at 12:39 AM, Jianqing Zhang wrote: > Thanks Michael. I'm using C++ and have not figured it out. I'm > wondering how I can get these namespace URIs. information > > The following xpath expression ".//namespace::*" can find all namespaces declarations in a document and it works w

Re: [xml] Can I read namespace URIs as regular attributes?

2009-09-05 Thread Daniel Veillard
On Tue, Sep 01, 2009 at 10:30:37PM -0500, Jianqing Zhang wrote: > I'm trying to read all namespace URIs by go through all attributes of > the root element. Can I read them as regular attributes? No, basically libxml2 separates the namespaces when parsing, and move them out of the attribute list.

Re: [xml] Can I read namespace URIs as regular attributes?

2009-09-03 Thread Michael Ludwig
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

Re: [xml] Can I read namespace URIs as regular attributes?

2009-09-02 Thread Jianqing Zhang
Thanks Michael. I'm using C++ and have not figured it out. I'm wondering how I can get these namespace URIs. information On Wed, Sep 2, 2009 at 4:23 AM, Michael Ludwig wrote: > Jianqing Zhang schrieb: >> >> I'm trying to read all namespace URIs by go through all attributes of >> the root element.

Re: [xml] Can I read namespace URIs as regular attributes?

2009-09-02 Thread Michael Ludwig
Jianqing Zhang schrieb: I'm trying to read all namespace URIs by go through all attributes of the root element. Can I read them as regular attributes? Jianqing, I don't know the C API, but in general, a parser may have a flag to turn namespace-awareness on or off. I'm not sure LibXML2 has thi

[xml] Can I read namespace URIs as regular attributes?

2009-09-01 Thread Jianqing Zhang
I'm trying to read all namespace URIs by go through all attributes of the root element. Can I read them as regular attributes? My code is following: // Current node is the root element attrNum = xmlTextReaderAttributeCount(reader); for (i=0;ihttp://xmlsoft.org/ xml@gnome.org http://ma