Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Newbie problems . . .

From: "Buzby" <gb@---------.--->
To: NULL
Date: 10/17/2008 12:58:00 PM
Martin Honnen wibbled:

> Buzby wrote:
> 
> > > Why do you try that? Can't you simply use xmlhttp.responseXML as
> > > the input document for your transformation?
> > 
> > I though thats what "xml.loadxml(xmlhttp.responseText) " did!?
> 
> The MSXML request object already exposes a responseXML property so
> there is usually no need to parse responseText, that does not gain
> you anything. Use responseXML as the input e.g.    processor.input =
> xmlhttp.responseXML

Please bear with with me on this one - as I said I'm new to all this
and am struggling!

Ok code now as follows:-


--
		
Set xml = Server.CreateObject("MSXML2.FreeThreadedDOMDocument.3.0")
xml.async = false
xml.loadXml(xmlhttp.responseXML.xml)
				
				
Set xsl = Server.CreateObject("MSXML2.FreeThreadedDOMDocument.3.0")
xsl.async = false
xsl.load (Server.MapPath("/xsl/test2.xsl"))

				
Set template = Server.CreateObject("MSXML2.XSLTemplate")
template.stylesheet = xsl
set processor = template.createProcessor()

	
processor.input = xml

				
' name parameters
				
If city <> "" Then 	processor.addParameter "city", city

		
'Transform
				
processor.transform()
Response.write (processor.output)

--

xmlhttp.responseXML.xml returns the following xml which looks correct
to me:
 
--

<?xml version="1.0"?>
<!DOCTYPE respuesta SYSTEM
"http://www.hotelresb2b.com/xml/dtd/res_paises.dtd">
<respuesta>
	<tipo><![CDATA[5]]></tipo>
	<nombre><![CDATA[Paises]]></nombre>
	<agencia><![CDATA[BOOK THIS ROOM]]></agencia>
	<parametros>
		<paises>
			<pais>
				<codigo_pais><![CDATA[AI]]></codigo_pais>
				<nombre_pais><![CDATA[ALBANIA]]></nombre_pais>
			</pais><pais>
				<codigo_pais><![CDATA[AL]]></codigo_pais>
				<nombre_pais><![CDATA[ALEMANIA]]></nombre_pais>
			</pais><pais>
				<codigo_pais><![CDATA[AN]]></codigo_pais>
				<nombre_pais><![CDATA[ANDORRA]]></nombre_pais>
			</pais>		
		</paises>
	</parametros>
</respuesta>

--

When I run this transformation I'm getting the following error:

Error parsing XML file:No data is available for the requested resource.
[http://www.hotelresb2b.com/xml/dtd/res_paises.dtd: line 0, col 0]


All help, pointers abuse etc gratefully recieved!

Thanks

-- 
Buzby
There's nothing more dangerous than a resourceful idiot


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