Results 1 to 3 of 3

Thread: Cannot view XML input using style sheet

  1. #1
    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.

  2. #2
    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 
    
    %>

  3. #3
    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 
    
    %>

Similar Threads

  1. Replies: 2
    Last Post: 18-01-2012, 04:44 PM
  2. Where can I find excel style to get data input cells
    By Krishnaraju in forum Windows Software
    Replies: 5
    Last Post: 06-07-2011, 12:05 AM
  3. How to create Good style sheet
    By JEROLD12 in forum Software Development
    Replies: 5
    Last Post: 25-12-2009, 10:51 PM
  4. How to change style sheet for iframe?
    By Jaishree in forum Software Development
    Replies: 2
    Last Post: 20-06-2009, 12:49 PM
  5. Display HTML in XSL Style Sheet
    By Neil'o in forum Software Development
    Replies: 2
    Last Post: 27-03-2009, 09:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •