[xml] SAX and userData



Hi there,
I hope this is an easy one.  I've been trying to get my userData
in the callbacks but I'm doing something wrong or I just don't
understand how it is supposed to work.  I first start by calling:

xmlSAXParseFileWithData(&handler, xmlfilename, 0, (void *)5);

Now in this example I would think that the userData would be set
to 5.  However, in my startDocument(void *ctxt) callback, ctxt
is not set to 5.  I am assuming that libxml is calling startDocument
with userData due to grepping through the source code.  But at the
same time it looks like xmlSAXParseFileWithData(..., data) sets
ctxt->_private to data, and I was not able to figure out how
_private gets to userData.

Any suggestions?  I'm using 2.4.20.  Thanks alot.

---
David F. Newman
Unix Administrator
dnewman maraudingpirates org




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