[jdom-interest] parsing jsp file

Jason Hunter jhunter at servlets.com
Tue Aug 19 22:22:35 PDT 2003


Yours is a parser problem.  JDOM uses "off the shelf" parsers.  So it's 
outside the JDOM realm.  I'd try regular expressions if the task isn't 
too general.

-jh-

Oleg Timofeyev wrote:

> Hey guys I am trying to parse a file that has a mix of html and jsp,
> basically here it is:
> 
> 
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> <HTML>
> <HEAD>
> <TITLE></TITLE>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
> <LINK REL=stylesheet TYPE="text/css" HREF="Style.css">
> </HEAD>
> <BODY marginheight=0 marginwidth=0 topmargin=0 leftmargin=0>
> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
>  <TR>
>   <TD><tiles:insert attribute="welcome"/></TD>
>   <TD><tiles:insert attribute="header"/></TD>
>  </TR>
>  <TR>
>   <TD COLSPAN=2><tiles:insert attribute="menu" /></TD>
>  </TR>
>  <TR>
>   <TD COLSPAN=2><tiles:insert attribute="news" /></TD>
>  </TR>
>  <TR>
>   <TD COLSPAN=2><tiles:insert attribute="footer" /></TD>
>  </TR>
> </TABLE>
> ------------------------------------------------------------
> 
> I want to extract <tiles:insert attributes. Of course its not
> well-formed and quits parsing at first line because of <%@
> 
> Any ideas? Or I shouldn't be using JDOM for that at all. Thank you. 
> 
> Sincerely,
> 
> Oleg 
> 
> 
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
> 




More information about the jdom-interest mailing list