Re: [xml] xmlNodeListGetString question
- From: Jim Breen <jwb mail csse monash edu au>
- To: xml gnome org
- Cc: xml gnome org
- Subject: Re: [xml] xmlNodeListGetString question
- Date: Thu, 25 Jul 2002 09:56:45 +1000 (EST)
[Daniel Veillard (Re: [xml] xmlNodeListGetString question) writes:]
Use:
xmlChar *
xmlNodeGetContent(xmlNodePtr cur)
That picked out the words from the <foreign/> OK, but didn't get the English
words around it. If there is no embedded <foreign/> it's fine.
As I see it I have to loop somehow, but I can't see the process for doing
this.
The manual says of xmlNodeGetContent(): "Read the value of a node, this can
be either the text carried directly by this node if it's a TEXT node or the
aggregate string of the values carried by this node child's (TEXT and
ENTITY_REF). Entity references are substituted."
What I need is BOTH the text carried directly by this node and the values
carried by this node's child.
<term lang="en">Some English words <foreign lang="sa">some Sanscrit words
</foreign> some more English words</term>
Any suggestions?
Jim
--
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]