std.xml.element_parser.on_end_tag
- multiple declarations
- Variable ElementParser.onEndTag
- Variable ElementParser.onEndTag
Variable ElementParser.onEndTag
Register a handler which will be called whenever an end tag
is
encountered which matches the specified name. You can also pass null as
the name, in which case the handler will be called for any unmatched
end tag
.
Declaration
class ElementParser
{
// ...
void delegate(const(Element))
onEndTag;
// ...
}
Examples
// Call this function whenever a end tag is encountered onEndTag["podcast"] = (in Element e) { // Your code here // // This is a a closure, so code here may reference // variables which are outside of this scope }; // call myEpisodeEndHandler (defined elsewhere) whenever an // end tag is encountered onEndTag["episode"] = &myEpisodeEndHandler; // call delegate dg for all other end tags onEndTag[null] = dg;
Note that your function will be called for both start tags and empty tags. That is, we make no distinction between <br></br> and <br/>.
Variable ElementParser.onEndTag
Register a handler which will be called whenever an end tag
is
encountered which matches the specified name. You can also pass null as
the name, in which case the handler will be called for any unmatched
end tag
.
Declaration
class ElementParser
{
// ...
void delegate(const(Element))
onEndTag;
// ...
}
Examples
// Call this function whenever a end tag is encountered onEndTag["podcast"] = (in Element e) { // Your code here // // This is a a closure, so code here may reference // variables which are outside of this scope }; // call myEpisodeEndHandler (defined elsewhere) whenever an // end tag is encountered onEndTag["episode"] = &myEpisodeEndHandler; // call delegate dg for all other end tags onEndTag[null] = dg;
Note that your function will be called for both start tags and empty tags. That is, we make no distinction between <br></br> and <br/>.
Authors
Janice Caron