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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using Jscript to write an XML file

Status
Not open for further replies.

emms

Programmer
Jan 11, 2001
55
GB
Hi,

I'm trying to write some JScript code to query a database and give the output as a pure XML file... I've found loads of help doing this with VBScript but none for JScript.

If I can get:

<%@LANGUAGE=&quot;JScript&quot;%>
<%
response.ContentType=&quot;text/xml&quot;

response.Write(&quot;<?xml version='1.0' encoding='ISO-8859-1'?>&quot;)
response.Write(&quot;<note>&quot;)
response.Write(&quot;<from>from: Jani</from>&quot;)
response.Write(&quot;<to>Tove</to>&quot;)
response.Write(&quot;<message>Remember me this weekend</message>&quot;)
response.Write(&quot;</note>&quot;)
%>


to work it would be a start! This works fine if I change Jscript to VBScript.

any ideas/pointers

Emma
 
JScript is case-secinsitive, you need to capitalie all the Response's in the response.Write's.

Also, though it isn't entirely necessary, it is generally considered good practice to put semi-colons at the end of the line. Generally I though tit was required, but apparently MS didn't require it for JScript.
-Tarwn

[sub]01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111[/sub]
The never-completed website:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top