addAttributeFilter

public function addAttributeFilter(callback:function):void
Adds a attribute filter function to the parser, the parser will collect nodes that has the specified attributes and then execute the callback ones it has finished parsing the document.

Examples

parser.addAttributeFilter('src,href', function(nodes, name) {
	for (var i = 0; i < nodes.length; i++) {
		console.log(nodes[i].name);
	}
});

Params

Name Type Description
callback function Callback function to execute once it has collected nodes.