How I can read the content of the attributes of the MetaTag in java loading in parser a file .html
(E' demanded the complete code)?
You answer to me soon.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To get the <META> tag you can use a filter like:
NodeList list = parser.extractAllNodesThatMatch (new TagNameFilter ("META"));
Like any tag, the attributes are available with getAttributes(), or if you are concerned about the order and whitespace beteen the attributes, getAttributesEx().
The getAttributes() method returns a Hashtable with the name value pairs, and you need to watch out for null values being returned (see the fields on SpecialHashtable).
The getAttributesEx() method returns a Vector containing everything in the tag, whitespace included (see Attribute).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How I can read the content of the attributes of the MetaTag in java loading in parser a file .html
(E' demanded the complete code)?
You answer to me soon.
Thanks.
To get the <META> tag you can use a filter like:
NodeList list = parser.extractAllNodesThatMatch (new TagNameFilter ("META"));
Like any tag, the attributes are available with getAttributes(), or if you are concerned about the order and whitespace beteen the attributes, getAttributesEx().
The getAttributes() method returns a Hashtable with the name value pairs, and you need to watch out for null values being returned (see the fields on SpecialHashtable).
The getAttributesEx() method returns a Vector containing everything in the tag, whitespace included (see Attribute).