[xml] xmlNodeGetContent() completely recursive?



Hello,

i'm looking for the most suitable way to retrieve the content of element
nodes
and per the docs, xmlNodeGetContent() seems to be exact what i need.

  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 substitued.

But there's one problem: The behavior of xmlNodeGetContent()  is
"completely" recursiv,
that is, it aggregates not only the child (TEXT and ENTITY_REF) nodes but
also the
grandchild nodes, the grand-grandchild nodes etc.
So, if i call xmlNodeGetContent() on a root element, i'll get an aggregation
of all TEXT
nodes enclosed by the document.
Well, i think this behavior is "by design", but is there a similar method
that provides
only the aggregation of the 1st generation (TEXT-  and ENTITY_REF-) child
nodes of a given node?



Mit freundlichen Gruessen - Kind regards
Markus Henke



________________________Addressed by:________________________
 ORDAT GmbH & Co. KG  -  Serversystems / eCom 
 Dipl.-Inf. (FH) Markus Henke  Fon: +49 (641) 7941-0
 Rathenaustr. 1                Fax: +49 (641) 7941-132
 35394 Gießen                  mailto:markus henke ordat com
 See:                          http://www.ordat.com
_____________________________________________________________
              ...this behavior is by design...

 <<Markus Henke.vcf>> 

Attachment: Markus Henke.vcf
Description: Binary data



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