From: Manuel Guesdon (mguesdon@oxymium.net)
Date: Sat Sep 09 2000 - 11:25:41 EDT
Hello,
I have a question on xmlParserCtxt.userData. I wanted to use it as a "user data" (a value I can use to specify anything I want) but this doesn't seems to be the purpose of this variable.
The documentation/headers describe it as "the document being built"
void *userData; /* the document being built */
but xmlInitParserCtxt(xmlParserCtxtPtr ctxt) initialize it like this:
ctxt->userData = ctxt;
(BTW, ctxt->vctxt.userData is also initalized to ctxt)
In parser.c, theres's a call to startDocument handler with this userData
ctxt->sax->startDocument(ctxt->userData);
and startDocument assume this ctxt->userData is a xmlParserCtxt:
startDocument(void *ctx)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
...
So, is this userData is really a "user data" I can use as I want or is it a private variable I shouldn't change ? Or is there a problem in the code ?
Thx
Manuel
---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
This archive was generated by hypermail 2b29 : Sat Sep 09 2000 - 12:43:25 EDT