void sanitizeTree(Node node)

Called with the root of the tree which is to be sanitized.

This method needs to walk the entire tree and either remove elements and attributes which are not recognized as safe or throw an exception which will mark the entire tree as unsafe.

Source

void sanitizeTree(Node node);