Fuck.... ur are absolutely right Emmanuel... that was my mistake. I have to
use xmlFirstElement(cur) I didnt know that the first node of a text-node is
"\n". Someone has to write it down somewhere ;-)
I have a book about libxml und i searched google and this page, but didnt
find an explanation like this.

Thx. i think now i can try to read the real files with the namespaces in
hope that it will work.

thxthxthx ^^

2010/1/4 Emmanuel Rodriguez <[email protected]>

>
>
> On Mon, Jan 4, 2010 at 9:00 PM, Andreas Wagner 
> <[email protected]>wrote:
>
>> The parent of the param Node where i should be is definitively parameter
>> and the child must be param and i am in the correct line ( cur->line).
>>
>
> Be careful because if you have text between the parent element and the
> child element then you will have at least a text node in between the two
> elements.
>
> The following xml snippet:
>
> <parameter>
>   <param  parName="parameter1" type="BOOL" value="true"/>
> </parameter>
>
> Produces:
> Element (<parameter)
>   -> children (text "\n  ") -> next (Element <param >)
>
> Text elements are part of the DOM too and they are also represented as
> xmlNodes. Use the property type to see what kind of node you're inspecting.
> If you really want to get the child element and not the child then use
> xmlFirstElementChild(cur)
>
> --
> Emmanuel Rodriguez
>
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to