[xml] xmlNodeListGetString question

I am a newbie to libxml, and have a question about extracting text from
an element.

The element in question is defined as:

<!ELEMENT term (#PCDATA | foreign | xref)*>
<!ATTLIST term etc. etc.>

And in the case that's causing me a problem, the element looks like:

<term lang="en">Some English words <foreign lang="sa">some Sanscrit words
</foreign> some more English words</term>

I am using xmlNodeListGetString to pull out a text string from the <term/>
elements, but it is choking on the embedded <foreign/>. What I want from this
is just "Some English words some Sanscrit words some more English words", but
I can see how to detect the <foreign/> and stitch the three strings together.

I'm doing this in C.

Sorry if it's a dumb question.


Jim Breen  (j breen csse monash edu au  http://www.csse.monash.edu.au/~jwb/)
Computer Science & Software Engineering,                Tel: +61 3 9905 3298
P.O Box 26, Monash University,                          Fax: +61 3 9905 5146
Clayton VIC 3800, Australia      ジム・ブリーン モナシュ大学

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