Re: [xml] xmlNodeListGetString question
- From: Daniel Veillard <veillard redhat com>
- To: Jim Breen <jwb mail csse monash edu au>
- Cc: xml gnome org
- Subject: Re: [xml] xmlNodeListGetString question
- Date: Tue, 23 Jul 2002 20:13:56 -0400
Use:
xmlChar *
xmlNodeGetContent(xmlNodePtr cur)
Daniel
On Wed, Jul 24, 2002 at 10:07:29AM +1000, Jim Breen wrote:
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
--
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 $B%8%`!&%V%j!<%s(B $B%b%J%7%eBg3X(B
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]