ElementParser.onPI

Register a handler which will be called whenever a processing instruction is encountered.

class ElementParser
@property @safe @nogc pure nothrow
void
onPI
(
Handler handler
)

Examples

// Call this function whenever a processing instruction is encountered
onPI = (string s)
{
    // Your code here

    // The passed parameter s does not include the opening <? nor
    // closing ?>
    //
    // This is a a closure, so code here may reference
    // variables which are outside of this scope
};

Meta

Suggestion Box / Bug Report