Re: [xml] Get text content of an element which surrounds another element

2013-10-23 Thread Bogdan Cristea
On 10/23/2013 05:55 PM, Nikolay Sivov wrote: Hah, so you're saying that first XML_READER_TYPE_TEXT gives you not-null pointer with xmlTextReaderCurrentNode()? And this returned node contains concatenated text from first and last children of 'h1'? That strange. No, when I call xmlTextReaderCur

Re: [xml] Get text content of an element which surrounds another element

2013-10-23 Thread Nikolay Sivov
On Mon, Oct 21, 2013 at 11:50 AM, Bogdan Cristea wrote: > On 10/20/2013 06:53 PM, Nikolay Sivov wrote: > >> On 10/20/2013 19:13, Bogdan Cristea wrote: >> >>> First, I am puzzled by the way I can obtain the text contained by h1 >>> element. I am using the node from a previous xmlTextReaderRead() c

Re: [xml] Get text content of an element which surrounds another element

2013-10-21 Thread Bogdan Cristea
On 10/20/2013 06:53 PM, Nikolay Sivov wrote: On 10/20/2013 19:13, Bogdan Cristea wrote: First, I am puzzled by the way I can obtain the text contained by h1 element. I am using the node from a previous xmlTextReaderRead() call. If I try to obtain the current node in XML_READER_TYPE_TEXT case t

Re: [xml] Get text content of an element which surrounds another element

2013-10-21 Thread Bogdan Cristea
On 10/21/2013 09:58 AM, rbondue@orange.com wrote: Hello, Second, I don't know how to obtain the text after element which still belongs to element. s there a way to do so ? It is my understanding that this is what xmlNodeGetContent() is for. Just remember that you will have to free the s

Re: [xml] Get text content of an element which surrounds another element

2013-10-21 Thread rbondue.ext
Hello, > Second, I don't know how to obtain the text after element which > still belongs to element. s there a way to do so ? It is my understanding that this is what xmlNodeGetContent() is for. Just remember that you will have to free the string returned. Regards, Romain Bondue ___

Re: [xml] Get text content of an element which surrounds another element

2013-10-20 Thread Nikolay Sivov
On 10/20/2013 19:13, Bogdan Cristea wrote: First, I am puzzled by the way I can obtain the text contained by h1 element. I am using the node from a previous xmlTextReaderRead() call. If I try to obtain the current node in XML_READER_TYPE_TEXT case the node pointer is NULL. Well, that's not surp

[xml] Get text content of an element which surrounds another element

2013-10-20 Thread Bogdan Cristea
Hi I would like to take the text content of element in the example below: Image followssmilref="speechgen0002.smil#tcp7" />after imge I am using xmlTextReader, but I can get only the text before the image. Here is the basic code I use: while (1 == xmlTextReaderRead(reader)) { sw