Re: [xml] namespaces

On Tue, Jun 20, 2006 at 04:32:00PM +0300, boss gregerhaga net wrote:
trying to parse this xml fragment
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="";
xmlns=""; xmlns:perljobs="";
<channel rdf:about="";>
<description>The Perl Jobs site</description>
<dc:rights>Copyright 2001,</dc:rights>
<dc:publisher>ask perl org</dc:publisher>
<dc:creator>ask perl org</dc:creator>
<dc:subject>Perl Jobs</dc:subject>;
..having some problems determining when I reach the dc namespace in the parse.
I tried to check the ns menber of the nodes to find out if the node  
contents of, for example language, which I get with  
xmlNodelistGetString, belongs to the dc namespace. This failed, the ns  
member of the nodes are empty. Is it correct that the ns member should  
be empty? How to check in a parse when and if I reach a particular  

  All the element nodes here should have a namespace, so their ->ns
should not be NULL. No idea how you got something different.


Daniel Veillard      | Red Hat
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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