Re: [xml] traverse the XML tree but contents and attributes are emmpty

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Thu Dec 07 2000 - 05:29:45 EST


On Thu, Dec 07, 2000 at 09:57:22AM -0000, Wang, Hai wrote:
>
> Hello everybody,
> I have got a problem with gnome parser, I tried to parse a XML doc
> from memory, it was good, but when I tried to traverse the xml tree in
> xmlDocPtr to get all the nodes and print out their names, attributesname and
> contents, I find the following problems:
> 1. Node name is correct, but with text node, (I want to get rid of the text
> node).
> 2. attributes are empty
> 3 contents are all empty.

  You need to (re)read
  http://xmlsoft.org/#tree

Attributes and element nodes don't have content they have children,
Only leaves in the tree have content !

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | libxml Gnome XML toolkit
Tel : +33 476 615 257  | 655, avenue de l'Europe | http://xmlsoft.org/
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Rpmfind search site
 http://www.w3.org/People/all#veillard%40w3.org  | http://rpmfind.net/
----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Dec 07 2000 - 05:43:49 EST