[Omaha.pm] Help with parsing HTML

Ryan Stille rps at willcomminc.com
Wed Sep 28 12:27:48 PDT 2005


Andy Lester wrote:
> On Wed, Sep 28, 2005 at 12:00:55PM -0500, Ryan Stille
> (rps at willcomminc.com) wrote:
>> Ok I am getting closer.  The problem is it is ignoring nested tags. 
> 
> You'll have to keep track of your own internal stack of them,
> I believe.  There may also be an option for it.

I got it working, pretty much.  If I set "$p->{textify} =
{'cfqueryparam' => 'value'}" it tells the parser to treat the
<cfqueryparam> tag as text.  It does not display it exactly, instead it
displays the value in the 'value' attribute, i.e.

<CFQUERY DATASOURCE="myfoo">
SELECT foo FROM table WHERE id = <cfqueryparam value="#myvalue#">
</CFQUERY>

Gets returned as: SELECT foo FROM table WHERE id = #myvalue#

Which is good enough for me.  Now I can count the selects, inserts,
deletes, etc. inside each block and flag the ones that have more than
one.  We are migrating to MySQL, which does not support more than one
query in a single statement.

Thanks for the help.

-Ryan





More information about the Omaha-pm mailing list