Ask a Question related to ASP Database, Design and Development.
-
Lasse Edsvik #1
select -> xml file?
Hello
Im trying to build a simple page that outputs xml. but i dont see the
browser understand that contenttype or something like that since the nodes
arent "clickable", i need to use view source to see it....... was wondering
if there is an other way of doing this or if this is the best way, or if
there is something i can add so the browser treat the content as it would if
i open up a xml file in explorer.
<%
response.contenttype = "text/xml"
'i open db here
sql="select * from employees"
set rs=conn.execute(sql)
response.write("<?xml version=""1.0"" encoding=""UTF-8""?>")
response.write("<ROOT>")
if not rs.eof then
do until rs.eof
response.write("<Employee>"&rs("employee")&"</Employee>")
rs.movenext
loop
end if
set conn=nothing
response.write("</ROOT>")
%>
/Lasse
Lasse Edsvik Guest
-
Can't select file to link text to
When in 'edit page' mode and trying to link text to another web page, I get the error message: 'You can't select this file because it exceeds the... -
Select File on the Server error
Hey anyone out there know how I can fix this error... IO error on Server Communication CF MX7 local development server ( just installed) Prior... -
select for a text file
Hi, I tried to make select query to a text file using the code below, <% sconnection="Provider=Microsoft.Jet.OLEDB.4.0;Data... -
select() max number of file descriptors
It seems that my system's select call has a limitation of 1024 open file descriptors. I need to learn about this restriction as I am programming... -
Select a sound file from menu
Using Director MX I have created an interactive tour with a sound file playing as background music. I would like to give the user a choice of music... -
Bob Barrows #2
Re: select -> xml file?
Lasse Edsvik wrote:
If I change your code to this (commenting out the ADO code):> Hello
>
> Im trying to build a simple page that outputs xml. but i dont see the
> browser understand that contenttype or something like that since the
> nodes arent "clickable", i need to use view source to see it.......
> was wondering if there is an other way of doing this or if this is
> the best way, or if there is something i can add so the browser treat
> the content as it would if i open up a xml file in explorer.
>
>
> <%
> response.contenttype = "text/xml"
>
> 'i open db here
> sql="select * from employees"
> set rs=conn.execute(sql)
>
> response.write("<?xml version=""1.0"" encoding=""UTF-8""?>")
> response.write("<ROOT>")
>
> if not rs.eof then
> do until rs.eof
> response.write("<Employee>"&rs("employee")&"</Employee>")
>
> rs.movenext
> loop
> end if
> set conn=nothing
>
> response.write("</ROOT>")
> %>
>
>
> /Lasse
<%
response.contenttype = "text/xml"
'i open db here
' sql="select * from employees"
'set rs=conn.execute(sql)
response.write "<?xml version=""1.0"" encoding=""UTF-8""?>"
response.write "<ROOT>"
'if not rs.eof then
' do until rs.eof
' response.write("<Employee>"&rs("employee")&"</Employee>")
response.write "<Employee>A</Employee>"
' rs.movenext
' loop
'end if
'set conn=nothing
response.write "</ROOT>"
%>
I see the proper result in the browser. Do you?
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows Guest
-
Lasse Edsvik #3
Re: select -> xml file?
Bob,
I need to use view source to see all elements and structure.......
i use IE6
/Lasse
"Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
news:eDg04eS1DHA.2544@TK2MSFTNGP10.phx.gbl...> Lasse Edsvik wrote:>> > Hello
> >
> > Im trying to build a simple page that outputs xml. but i dont see the
> > browser understand that contenttype or something like that since the
> > nodes arent "clickable", i need to use view source to see it.......
> > was wondering if there is an other way of doing this or if this is
> > the best way, or if there is something i can add so the browser treat
> > the content as it would if i open up a xml file in explorer.
> >
> >
> > <%
> > response.contenttype = "text/xml"
> >
> > 'i open db here
> > sql="select * from employees"
> > set rs=conn.execute(sql)
> >
> > response.write("<?xml version=""1.0"" encoding=""UTF-8""?>")
> > response.write("<ROOT>")
> >
> > if not rs.eof then
> > do until rs.eof
> > response.write("<Employee>"&rs("employee")&"</Employee>")
> >
> > rs.movenext
> > loop
> > end if
> > set conn=nothing
> >
> > response.write("</ROOT>")
> > %>
> >
> >
> > /Lasse
> If I change your code to this (commenting out the ADO code):
> <%
> response.contenttype = "text/xml"
>
> 'i open db here
> ' sql="select * from employees"
> 'set rs=conn.execute(sql)
>
> response.write "<?xml version=""1.0"" encoding=""UTF-8""?>"
> response.write "<ROOT>"
>
> 'if not rs.eof then
> ' do until rs.eof
> ' response.write("<Employee>"&rs("employee")&"</Employee>")
> response.write "<Employee>A</Employee>"
> ' rs.movenext
> ' loop
> 'end if
> 'set conn=nothing
>
> response.write "</ROOT>"
> %>
>
> I see the proper result in the browser. Do you?
>
> Bob Barrows
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
Lasse Edsvik Guest
-
Bob Barrows #4
Re: select -> xml file?
Lasse Edsvik wrote:
I'm using IE6 as well, and I definitely see the XML without viewing source.> Bob,
>
> I need to use view source to see all elements and structure.......
>
> i use IE6
>
> /Lasse
>
When you view source, does the xml look correct? If it's not too much data,
could you post the source so we can see if there are any problems with it?
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows Guest
-
Lasse Edsvik #5
Re: select -> xml file?
Bob,
yep, its correct, to test i took some data from the source and saved it as
text.xml and then it showed up properly in the browser. Tried with only 1
row too, same result.......
some content-type problem going on?
/Lasse
"Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
news:%23vAD$lS1DHA.2412@TK2MSFTNGP10.phx.gbl...source.> Lasse Edsvik wrote:>> > Bob,
> >
> > I need to use view source to see all elements and structure.......
> >
> > i use IE6
> >
> > /Lasse
> >
> I'm using IE6 as well, and I definitely see the XML without viewingdata,> When you view source, does the xml look correct? If it's not too much> could you post the source so we can see if there are any problems with it?
>
> Bob Barrows
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
Lasse Edsvik Guest
-
Bob Barrows #6
Re: select -> xml file?
Lasse Edsvik wrote:
No clue - I've never seen this problem. Normally, I would try Google at this> Bob,
>
> yep, its correct, to test i took some data from the source and saved
> it as text.xml and then it showed up properly in the browser. Tried
> with only 1 row too, same result.......
>
> some content-type problem going on?
>
point, but I don't have much time this morning so I suggest you try it
yourself.
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows Guest
-
Brynn #7
Re: select -> xml file?
Can you put a sample of the page up somewhere where we can try to view
it?
On Wed, 7 Jan 2004 15:18:40 +0100, "Lasse Edsvik" <lasse@nospam.com>
wrote:
>Bob,
>
>I need to use view source to see all elements and structure.......
>
>i use IE6
>
>/Lasse
>
>
>"Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
>news:eDg04eS1DHA.2544@TK2MSFTNGP10.phx.gbl...>>> Lasse Edsvik wrote:>>>> > Hello
>> >
>> > Im trying to build a simple page that outputs xml. but i dont see the
>> > browser understand that contenttype or something like that since the
>> > nodes arent "clickable", i need to use view source to see it.......
>> > was wondering if there is an other way of doing this or if this is
>> > the best way, or if there is something i can add so the browser treat
>> > the content as it would if i open up a xml file in explorer.
>> >
>> >
>> > <%
>> > response.contenttype = "text/xml"
>> >
>> > 'i open db here
>> > sql="select * from employees"
>> > set rs=conn.execute(sql)
>> >
>> > response.write("<?xml version=""1.0"" encoding=""UTF-8""?>")
>> > response.write("<ROOT>")
>> >
>> > if not rs.eof then
>> > do until rs.eof
>> > response.write("<Employee>"&rs("employee")&"</Employee>")
>> >
>> > rs.movenext
>> > loop
>> > end if
>> > set conn=nothing
>> >
>> > response.write("</ROOT>")
>> > %>
>> >
>> >
>> > /Lasse
>> If I change your code to this (commenting out the ADO code):
>> <%
>> response.contenttype = "text/xml"
>>
>> 'i open db here
>> ' sql="select * from employees"
>> 'set rs=conn.execute(sql)
>>
>> response.write "<?xml version=""1.0"" encoding=""UTF-8""?>"
>> response.write "<ROOT>"
>>
>> 'if not rs.eof then
>> ' do until rs.eof
>> ' response.write("<Employee>"&rs("employee")&"</Employee>")
>> response.write "<Employee>A</Employee>"
>> ' rs.movenext
>> ' loop
>> 'end if
>> 'set conn=nothing
>>
>> response.write "</ROOT>"
>> %>
>>
>> I see the proper result in the browser. Do you?
>>
>> Bob Barrows
>> --
>> Microsoft MVP -- ASP/ASP.NET
>> Please reply to the newsgroup. The email account listed in my From
>> header is my spam trap, so I don't check it very often. You will get a
>> quicker response by posting to the newsgroup.
>>
>>
>Brynn Guest



Reply With Quote

