Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Splitting out elements

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 3/13/2009 1:30:00 PM
Buzby wrote:
> Hi
> 
> I'm completely stuck here, my Google powers have deserted me and hope
> someone may be able to give me a pointer or two.
> 
> I am successfully consuming a web service using xslt and asp (classic)
> to display the results. What I would like to do is create variables on
> the recieving asp page from the individual elements passed across from
> the xsl.
> 
> The code I'm using is as follows:
> 
> <%
> ContactID = Request.QueryString("cid")
> Host = "http://somedomain.com/link/id=" & ContactID 
> Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
> xmlhttp.Open "GET", Host, False
> xmlhttp.send 
> 				
> 
> SET xml = xmlhttp.responseXML
> Set xsl = Server.CreateObject("MSXML2.FreeThreadedDOMDocument")
> xsl.async = false
> xsl.load (Server.MapPath("xsl/contacts.xsl"))
> 				
> Set template = Server.CreateObject("MSXML2.XSLTemplate")
> template.stylesheet = xsl
> set Contacts = template.createProcessor()
> Contacts.input = xml
> Contacts.transform()
> Contacts = Contacts.output
> Set xmlhttp = Nothing
> 
> %>
> 
> There are several elements, name, address, phone etc which I'd like to
> extract individually from this transformation without having to make a
> separate request for each one individually - is this possible?

I am not sure I understand what you want to achieve. Is the result of 
your XSLT transformation also an XML document from which you want to 
extract data?  You can set
   Dim resultDocument
   Set resultDocument = Server.CreateObject("Msxml2.DOMDocument")
   resultDocument.async = False
   Contacts.output = resultDocument
   Contacts.transform()
I think, then after the transform() call you can access nodes in 
resultDocument.



-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent