Re: [Htmlparser-user] Ignore case of attributes
Brought to you by:
derrickoswald
|
From: Ian M. <ian...@gm...> - 2007-03-20 15:30:52
|
HasAttributeFilter doesn't yet support this. There was talk of doing
this by adding a constructor that takes a case-sensitivity value in
addition to the attribute value, but it's not been implemented yet.
Feel free to write it yourself and submit it to the project :)
Ian
On 3/20/07, Luca Telloli <tuk...@gm...> wrote:
> Hello everyone,
> I'm a newbie of htmlparser libraries so apologies for asking a
> possibly easy question. I have different HTML pages to parse, with
> the same meta attributes in different case fashions: for instance:
>
> case 1: <meta name="description" ...>
> case 2: <meta name="Description" ...>
>
> etc. I wrote a NodeFilter as follows:
>
> NodeFilter DescriptionMetaTag = new AndFilter (new TagNameFilter
> ("meta"), new HasAttributeFilter("name", "Description"));
>
> but it doesn't match the case 1. How can I correct the filter to
> match any possible case of the "description" keyword?
>
> Thanks in advance,
> Luca
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Htmlparser-user mailing list
> Htm...@li...
> https://lists.sourceforge.net/lists/listinfo/htmlparser-user
>
|