In the previous use of Htmlparser, did not consider the encounter org.htmlparser.tags outside the tag how to handle. Until a label like this is encountered, Htmlparser cannot process it if it is not processed. Check the custom label only then understand, control Htmlparser parsing page structure is, Prototypicalnodefactory implements Nodefactory. Each tag needs to be registered in Nodefactory (Registertag ()). All tags in the org.htmlparser.tags are registered by default. If you have a custom tag, register it inside. Custom labels can be extends Compositetag. Subclasses must implement the string[] GetIDs () method, which provides an instance of the class at the time of registration. Prototypicalnodefactory saved a map<string, node> Key is the name of the tag, which is the GetIDs () method returned by the string[]. Value is the instance provided at the time of registration. During the Htmlparser parsing process, the Clone () method of the instance is invoked to construct a node.
This is the first time I have seen the use of the Clone method in Java. Specific Clone () method of the call, and then look at the book it.