Excluding some tags
Manish Kashyap <[email protected]>
| Newsgroups | gmane.comp.parsers.htmlparser.user |
|---|---|
| Message-ID | <[email protected]> |
This indeed is a newbie question. I could not find a work around to exclude
some tags (<script> in my case) while parsing.
I tried using the NotFilter as underneath, but it didn't work as I got all
the <script> tags in my NodeList -
> NotFilter noScriptFilter = new NotFilter();
> noScriptFilter.setPredicate(new NodeFilter(){
> public boolean accept(Node currNode){
> if(currNode instanceof TagNode){
> if(((TagNode)currNode).getRawTagName().equalsIgnoreCase("script")){
> return true;
> }
> }
> return false;
> }
> });
> NodeList allNodes = this.parser.parse(noScriptFilter);
>
Would appreciate if someone can guide me throgh this.
Thanks
Manish
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Htmlparser-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/htmlparser-user