I am not married to xmlsearch at all. I don't want to build a hand
grenade to kill my ants though.
To tell you exactly what I am doing....
I built a simple web-based utility for SQL Server 2005 which shows me
all the currently running processes on my SQL server, exactly what line
of SQL they are executing, etc etc...
For requests originating from one of my web servers, I want to hit
SeeFusion's XML API with cfhttp and parse the XML it serves up showing
me all the currently running requests.
Then I want to look at those running requests and find the one with an
active query where the spid matches the spid I am outputting. There I
can find the name of the web server, the IP address of the end user, and
URL they are hitting. Furthermore I can get the name of the user based
on our login logs and the last person to log in from that IP. You get
the picture.
The XML elements (abbreviated) I want to find look like:
<seefusioninfo>
<server>
<runningRequests>
<page>
<query>
<info>
Active
</info>
<sql>
Select * from yadda
{DB=nations, SPID=205, Server=SQL12}
</sql>
</query>
</page>
</runningRequests>
</server>
</seefusioninfo>
I want to find the pages with a query which is active whose sql includes
"spid=205"
More importantly, I am interested in the data contained within the
"page" element. The stuff in the query element simply allows me to
filter out what pages I want.
If my xpath looked something like
"seefusioninfo/server/runningRequests/page/query/sql[text() = 'foo']"
Then the xmlsearch function would return to me the "sql" elements when
in fact I am interested in on of it's ancestors.
Make sense?
~Brad
-----Original Message-----
From: Ian Skinner [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 24, 2007 4:09 PM
To: CF-Talk
Subject: Re: xpaths and regex
Are you open to alternate techniques then xmlSearch()?
I have done similar work by creating XSLT strings|files with place
holders. Then using replace() function, replace the place holder with
the desired pattern to match at runtime and execute the XSLT with an
xmlTransform() function.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284473
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4