Menu

Problem meta tag

Help
Anonymous
2004-06-08
2004-06-09
  • Anonymous

    Anonymous - 2004-06-08

    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.

     
    • Derrick Oswald

      Derrick Oswald - 2004-06-09

      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).

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.