Re: 'RE: [xml] xmlHash problem"'

On Tue, Aug 13, 2002 at 12:41:43PM +0200, Uwe Fechner wrote:
I need this function, to get access the named-node-map of
entities and the
of the notations by index, and not by name.

  I don't understand the function you need, please be explicit by giving
a written description of that C entry point and what you expect from it,
I can hardly reverse analyze 50 lines of Pascal code to try to understand
what it was supposed to do.

Hello Daniel,

I try to explain it in other words:

Usually we access a hash, using a name to find the data (e.g. the name of an
attribute, an entity or a notation.

That is possible with the libxml2 api.

But sometimes I need a way to access the content of a hash by a numerical

So that I can loop (from i:=0 to hash.length do begin ... end) through all
entries of a hash.

There is an api function, to get the length of a hash. But there isn't any,
get an hash entry by index.

  use the sanner function, you get a callback for each entry in the hash table
it's part of the API since day 1:
    typedef void (*xmlHashScannerFull)(void *payload, void *data,
                                   const xmlChar *name, const xmlChar *name2,
                                  const xmlChar *name3);

  void                    xmlHashScan     (xmlHashTablePtr table,
                                           xmlHashScanner f, void *data);

 I don't think there is a need for an index based one considering the
existence of the scanner function(s).


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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