Hi Cedric,
This is actually already present in the parser. Every tag has a =
hashtable in it, which already contains all fields parsed. The API =
specific methods are provided only as a convenience. So, if you want to =
get the value of a field not in the API - simply do =
yourTag.getParameter("param-name")
Regards,
Somik
----- Original Message -----=20
From: C=E9dric Rosa=20
To: htm...@li...=20
Sent: Friday, June 28, 2002 8:27 PM
Subject: [Htmlparser-user] Missing Meta's treatments: maybe useful
Hello,
I've just read the wc3 recommendations for HTML and I've found that =
META=20
seems have others fields like:
lang, dir or scheme
http://www.w3.org/TR/html4/struct/global.html#h-7.4.4
<!ELEMENT META - O EMPTY -- generic metainformation -->
<!ATTLIST META
%i18n; -- lang, dir, for use with =
content --
http-equiv NAME #IMPLIED -- HTTP response header name =
--
name NAME #IMPLIED -- metainformation name --
content CDATA #REQUIRED -- associated information --
scheme CDATA #IMPLIED -- select form of content --
>
The best solution for patching is to modify
HTMLMetaTag:
------------
public HTMLMetaTag(int tagBegin, int tagEnd, String tagContents, =
String=20
httpEquiv, String metaTagName, String metaTagContents,String tagLine)
=3D>
public HTMLMetaTag(int tagBegin, int tagEnd, String tagContents, =
Hashtable=20
table,String tagLine)
HTMLMetaTagScanner:
-------------------
HTMLMetaTag metaTag =3D new=20
=
HTMLMetaTag(tag.elementBegin(),tag.elementEnd(),tag.getText(),httpEquiv, =
metaTagName,metaTagContents,currLine);
=3D>
HTMLMetaTag metaTag =3D new=20
=
HTMLMetaTag(tag.elementBegin(),tag.elementEnd(),tag.getText(),table,currL=
ine);
So after you are ready to get and set the fields in HTMLMetaTag.
Somik, do you think it will be a good solution ? If this solution is=20
convenient, I can't patch these files and mail it to you :)
Regards,
Cedric.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Caffeinated soap. No kidding.
http://thinkgeek.com/sf
_______________________________________________
Htmlparser-user mailing list
Htm...@li...
https://lists.sourceforge.net/lists/listinfo/htmlparser-user
|