[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: 'RE: [xml] xmlHash problem"'
- From: Daniel Veillard <veillard redhat com>
- To: Uwe Fechner <uwe fechner 4commerce de>
- Cc: xml gnome org
- Subject: Re: 'RE: [xml] xmlHash problem"'
- Date: Tue, 13 Aug 2002 07:09:43 -0400
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
> > > one
> > > 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
> index.
>
> So that I can loop (from i:=0 to hash.length do begin ... end) through all
> the
> entries of a hash.
>
> There is an api function, to get the length of a hash. But there isn't any,
> to
> 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
--
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]