Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

load vs loadxml

Status
Not open for further replies.

bont

Programmer
Sep 7, 2000
200
US
Hi,

I have been using this:

objXML.Load Server.MapPath("DVD_Cats.xml")

But now, I don't have a static XML, and want to do this:

objXML.loadXML("<cats TS=""""><cat name=""DVD_Cat_4.xml"" k=""4"" /></cats>")

The problem is, I get this:

msxml3.dll error '800c0006'

The system cannot locate the object specified.

/multimedia/movies/index_all.asp, line 31

Does anyone know why, or how I can use a dynamically generated XML doc. here is my code thus far:
Code:
<%@ Language=VBScript %>
<%
Dim objTemplate, objProcessor, strSortField, strGameNumber, objXML, objXSL, strHTML, aSTR, Root

Dim xmlDoc2
	Set objXML = Server.CreateObject("Msxml2.FreeThreadedDOMDocument.3.0")
	Set objXSL = Server.CreateObject("Msxml2.FreeThreadedDOMDocument.3.0")
	
		objXSL.async = False
		objXSL.Load Server.MapPath("DVD_All_Temp.xsl")
		Set objTemplate = Server.CreateObject("MSXML2.XSLTemplate.3.0")
		Set objTemplate.stylesheet = objXSL
		Set objProcessor = objTemplate.createProcessor
	
	if cstr(Request.QueryString("Key")) = "all" or cstr(Request.QueryString("Key")) = "" then
		objXML.async = False	
		objXML.Load Server.MapPath("DVD_Cats.xml")
		objProcessor.input = objXML
		call objProcessor.addParameter("Key", cstr(Request.QueryString("Key")))	

	
	else
		objXML.async = false
		objXML.loadXML("<cats TS=""""><cat name=""DVD_Cat_4.xml"" k=""4"" /></cats>")
		objProcessor.input = objXML
		call objProcessor.addParameter("Key", cstr(Request.QueryString("Key")))	
		

	end if	
	
	objProcessor.Transform
		strHTML = objProcessor.output
		Response.write strHTML	
%>
 
Your Xml was not valid it should read like this:
Code:
<cats TS="''"><cat name="" DVD_Cat_4.xml="" k="'4'" /></cats>

other than that the LoadXml method should work!

Stephan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top