#60 basic working of htmlparser

open
nobody
None
5
2008-05-08
2008-05-08
sssyyy
No

1. what grammar is used to select nodes?
2. how is node filtering done?
3. what does the Parser class do (detailed tasks)
4. what is the function of NodeList?

Discussion

  • Derrick Oswald
    Derrick Oswald
    2008-05-09

    Logged In: YES
    user_id=605407
    Originator: NO

    1. what grammar is used to select nodes?
    There is no grammar to select nodes, but see filtering below.
    2. how is node filtering done?
    The NodeFilter class and its subclasses are used to say whether a node should be included in the output NodeList.
    There are various combining filters too, like AndFilter and OrFilter.
    3. what does the Parser class do (detailed tasks)
    The parser doesn't do much it's mostly a locus for high level input... what URL, what error reporting etc.
    The detailed work is in the Lexer and Scanner classes.
    4. what is the function of NodeList?
    An ordered collection of nodes. In generic collection speak it is a List<Node>.