On Thu, Oct 6, 2011 at 18:13, Csaba Raduly <[email protected]> wrote:
> Forward to the list too
> ---------- Forwarded message ----------
> From: Csaba Raduly <[email protected]>
> Date: Thu, Oct 6, 2011 at 5:12 PM
> Subject: Re: [xml] Value out of ellement?
> To: Rob Eisink <[email protected]>
>
>
> On Thu, Oct 6, 2011 at 5:03 PM, Rob Eisink  wrote:
>> Let me more clear..
>>
>> The xml looks like <Device>JohnDoe</Device>
>> I call name = xmlTextReaderName(reader);
>>
>> the name is Device
>
> That means you are on a XML_READER_TYPE_ELEMENT.
>
> When you use the xml reader, your xml line will appear as three nodes:
> XML_READER_TYPE_ELEMENT          for <Device>
> XML_TEXT_READER_TEXT                   for JohnDoe
> XML_READER_TYPE_END_ELEMENT for </Device>
>
> You need to call xmlTextReaderRead to move to the XML_TEXT_READER_TEXT
> node, then call xmlTextReaderValue
>

As slightly simpler alternative: just move Reader to the <Device> node
and call xmlTextReaderReadString().

-- 
Andrew W. Nosenko <[email protected]>
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to