Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Cannot view XML input using style sheet

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 03-12-2010
Member
 
Join Date: Jul 2010
Posts: 38
Cannot view XML input using style sheet
  

I am getting the error while displaying the XML page. I am using the following code:
Code:
"<? Xml version =" 1.0 "encoding =" UTF-8 ""?>" 
<% 
Dim OggFile, origin, OggTxtStream 
source = Server.MapPath ("/ public / file.xml) 
Set fo = CreateObject ("Scripting.FileSystemObject") 
fo.CreateTextFile (source) 
September OggFile fo.GetFile = (source) 
September OggTxtStream OggFile.OpenAsTextStream = (2) 
OggTxtStream.WriteLine "<? Xml version =" 1.0 "encoding =" UTF-8 ""?>" 
OggTxtStream.WriteLine "<photos>" 
OggTxtStream.WriteLine "<B&W photo=''> Pic 1 </ Photo>" 
OggTxtStream.WriteLine "<B&W photo=''> Pic 2 </ photo>" 
OggTxtStream.WriteLine "<B&W photo=''> Pic 3 </ photo>" 
OggTxtStream.WriteLine "<B&W photo=''> Pic 4 </ photo>" 
OggTxtStream.WriteLine "</ photos>" 
OggTxtStream.close 

Response.Write "Writing successful. <a href=""/public/file.xml""> View </ a>" 
%>
I am getting this error message-
The XML page can not be displayed
Can not view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
I am expecting some help from your side.

Reply With Quote
  #2  
Old 03-12-2010
Member
 
Join Date: Jul 2010
Posts: 31
Re: Cannot view XML input using style sheet

I am also having the similar problem. I am getting the same error message. The following is the code of mine:
Code:
<% @ Language = "VBScript"%> 
<? Xml version = "1.0" encoding = "UTF-8"?> 
<% 
'NUMBER RESULTS 
Dim rs, strSQL 
StrConnection = "DRIVER = {Microsoft Access Driver (*. mdb)}; DBQ =" & _ 
Server.MapPath ("/ public") & "\ databaseimm.mdb" 

Set Conn = Server.CreateObject ("ADODB.Connection") 
Conn.Open StrConnection 


strSQL = "SELECT pub .* imm.agency, imm.tipmobile, imm.uso, imm.common, imm.price, imm.mq, imm.tipoperation FROM advertising pub inner join property on imm imm.codiceimmobile = pub.codiceimmobile WHERE pub.magazineadvertising = 'CASAIT' " 







Set rs = Server.CreateObject ("ADODB.Recordset") 
rs.CursorLocation = 3 
rs.Open strSQL, Conn, 1,1 



%> 
<thumbnails> 
<% 
While Not rs.EOF 
%> 
<Thumbnail filename ="<%= rs ("codiceimmobile ")%>" /> </ thumbnail> 
<% Rs.MoveNext: Wend%> 
</ Thumbnails> 
<% 


Sub PrintPhoto (ByVal sCodiceimmobile) 
Dim oCon1 
Dim oCon2 
Dim oRS1 
Dim oRS2 

September oCon1 = Server.CreateObject ("ADODB.Connection") 
September oCon2 = Server.CreateObject ("ADODB.Connection") 
September oRS1 = Server.CreateObject ("ADODB.Recordset") 
September oRS2 = Server.CreateObject ("ADODB.Recordset") 

oCon1.Open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" & Server.MapPath ("../ public / databaseimm.mdb ") &" Mode = ReadWrite " 
oCon2.Open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" & Server.MapPath ("../ public / databaseimm.mdb ") &" Mode = ReadWrite " 
September oRS1 oCon1.Execute = ("select Top 10 Index from photos WHERE CodiceImmobile =" & & sCodiceimmobile "and Post <> 0 ORDER BY Index") 
While Not oRS1.Eof 

September oRS2 oCon2.Execute = ("select Picture" & oRS1 ("Index") & "WHERE CodiceImmobile As Photos from property =" & sCodiceimmobile) 
Response.Write "<advertismentimage path=""http://www.abc.in/public/" & oRS2("Photo") & """ imagetype=""Image"" /> <br> 

oRS2.Close 
oRS1.MoveNext 
Wend 

oRS1.Close 
oCon1.Close 
oCon2.Close 

September oRS1 = Nothing 
September oRS2 = Nothing 
September oCon1 = Nothing 
September oCon2 = Nothing 

End Sub 





%> 

<% 
rs.close 
Set rs = nothing 

%>
Reply With Quote
  #3  
Old 03-12-2010
Member
 
Join Date: Jan 2006
Posts: 211
Re: Cannot view XML input using style sheet

I think that you need to insert a written "code view" that allows you to create the same XML file and also updated directly without clicking. This is my current code:
Code:
<% @ Language = "VBScript"%> 



<META Http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<? Xml version = "1.0" encoding = "UTF-8"?> 

<% 
'NUMBER RESULTS 
Dim rs, rs1, rs2, strSQL 



StrConection = "DRIVER = {Microsoft Access Driver (*. mdb)}; DBQ =" & _ 
Server.MapPath ("/ public") & "\ databaseimm.mdb" 

Set Con = Server.CreateObject ("ADODB.Conection") 
Con.Open StrConection 


strSQL = "SELECT pub .* imm.agency, imm.tipmobile, imm.uso, imm.common, imm.price, imm.mq, imm.tipoperation FROM advertising pub inner join property on imm imm.codiceimmobile = pub.codiceimmobile WHERE pub.magazineadvertising = 'CASAIT' "

Set rs = Server.CreateObject ("ADODB.Recordset") 
rs.CursorLocation = 3 
rs.Open strSQL, Con, 1,1 


source = Server.MapPath ("/ public / file.xml) 
September rs1 = CreateObject ("Scripting.FileSystemObject") 
rs1.CreateTextFile (source) 

Response.Write "Writing successful. <a href=""/public/file.xml""> View </ a>" 



%> 

<XMP> 
<thumbnails> 
<% 
While Not rs.EOF 
%> 
<Thumbnail filename ="<%= rs ("codiceimmobile ")%>" /> </ thumbnail> 
<% Rs.MoveNext: Wend%> 
</ Thumbnails> 


</ XMP> 



<% 


Sub PrintFoto (ByVal sCodiceimmobile) 
Dim oCon1 
Dim oCon2 
Dim oRS1 
Dim oRS2 

September oCon1 = Server.CreateObject ("ADODB.Conection") 
September oCon2 = Server.CreateObject ("ADODB.Conection") 
September oRS1 = Server.CreateObject ("ADODB.Recordset") 
September oRS2 = Server.CreateObject ("ADODB.Recordset") 

oCon1.Open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" & Server.MapPath ("../ public / databaseimm.mdb ") &" Mode = ReadWrite " 
oCon2.Open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" & Server.MapPath ("../ public / databaseimm.mdb ") &" Mode = ReadWrite " 
September oRS1 oCon1.Execute = ("select Top 10 Index from fotocasait WHERE CodiceImmobile =" & & sCodiceimmobile "and Post <> 0 ORDER BY Index") 
While Not oRS1.Eof 

September oRS2 oCon2.Execute = ("select Picture" & oRS1 ("Index") & "WHERE CodiceImmobile As Photos from property =" & sCodiceimmobile) 
Response.Write "<advertismentimage path=""http://www.mediacasaitalia.it/public/" & oRS2("Foto") & """ imagetype=""Image"" /> <br> 

oRS2.Close 
oRS1.MoveNext 
Wend 

oRS1.Close 
oCon1.Close 
oCon2.Close 

September oRS1 = Nothing 
September oRS2 = Nothing 
September oCon1 = Nothing 
September oCon2 = Nothing 

End Sub 





%> 

<% 
rs.close 
Set rs = nothing 

%>
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Cannot view XML input using style sheet"
Thread Thread Starter Forum Replies Last Post
How to turn on View Side by Side Sheet option in Microsoft Excel Rish!On MS Office Support 2 18-01-2012 04:44 PM
Where can I find excel style to get data input cells Krishnaraju Windows Software 5 06-07-2011 12:05 AM
How to create Good style sheet JEROLD12 Software Development 5 25-12-2009 10:51 PM
How to change style sheet for iframe? Jaishree Software Development 2 20-06-2009 12:49 PM
Display HTML in XSL Style Sheet Neil'o Software Development 2 27-03-2009 09:20 AM


All times are GMT +5.5. The time now is 11:21 AM.