Subject: [xsl] ASP/XML/XSL Combo From: "Robert Dahnke" <robert.dahnke@xxxxxxxx> Date: Sat, 09 Jun 2001 07:03:53 +0800 |
I need to search an XML document for text with ASP (Serverside) and I was wondering what was wrong with this code. The structure of the XML document is... <polls> <poll> <question>Question Here</question> </poll> </polls> <% set dbDocument = Server.CreateObject("Microsoft.XMLDOM") set style = Server.CreateObject("Microsoft.XMLDOM") set resultSet = Server.CreateObject("Microsoft.XMLDOM") dbDocument.async = false style.async = false dbDocument.load("xml/Polls.xml") style.load("xsl/generic.xsl") Set objRootElement = resultSet.createElement("polls") resultSet.appendChild objRootElement function DoSearch(searchStr) set docRoot = dbDocument.documentElement set polls = docRoot.selectNodes("/polls/poll") for each i in polls set poll = polls.item(i) set question = poll.selectSingleNode("question") if ( question.text.search(searchStr) ) Then set cloneTree = poll.cloneNode(true) objRootElement.appendChild cloneTree end if next end function call DoSearch("Expansion") Response.Write objRootElement.transformNode(style) -- _______________________________________________ Make PC-to-Phone calls with Net2Phone. Sign-up today at: http://www.net2phone.com/cgi-bin/link.cgi?121 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Delimited output from XML sou, Maulik Modi | Thread | [xsl] Leading +, Oliver Becker |
Re: [xsl] Producing Excel spreadshe, Peter Flynn | Date | Re: [xsl] xml->xsl->pdf (using Ante, Tokushige Kobayashi |
Month |