Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Splitting out elements [Thread Next] Re: Splitting out elementsTo: 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/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
