michaelrsweet/Mini-XML — Issue #6: Add context, preprocess callback, and whitespace callbacks
Author: michaelrsweet
Created: 2012-01-01 08:11:28+00:00
State: open
Labels: P4 - Feature

[originally posted as STR #66 by condenser]

For the C++ interface for MiniXML I am working on, I need to be able to set the user_data value for a node from within the load callback. For example, when calling mxmlLoadFile it is not possible to do this. A workaround would be if a top node is specified (say by calling mxmlNewXML and setting the user_data field), but then the top level encoding from the file is repeated.

This would be easiest to do if a user data argument could be added to the load callback. Thus, the function would be:

cb(node,context)

I could then use the context to set the user_data field in the nodes while I am parsing them. Could this be added?