[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

ASP/XML/XSL Combo

Subject: ASP/XML/XSL Combo
From: "Robert Dahnke" <robert.dahnke@xxxxxxxx>
Date: Sat, 09 Jun 2001 07:03:53 +0800
xsl combo
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.