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

PLEASE HELP - Create XML on the fly in asp page

Status
Not open for further replies.

SmileyFace

Programmer
Sep 10, 2002
99
0
0
US
Hey everyone! I am very new to xml and really need some urgent help with this. I have an asp page which processes data and returns a resultset. I want to be able to write this to an xml file which can be opened and read by another asp page. Here is some of the code....

Response.Buffer = True
Response.ContentType = "text/xml"

' Start XML document.
Response.Write "<?xml version=""1.0""?>" & vbCrLf

Response.write "<XML id=dsoEmployee>"
for i=1 to objoline.pas_o.count
sxml= objoline.pas_o(i).Comments_str
sxml2 = objoline.pas_o(i).price1_cur

Response.write "<employee>"
Response.write "<comments>" & sxml & "</name>"
Response.write "<price>" & sxml2 & "</age>"
Response.write "</employee>"
next
Response.write "</XML>"


Now I am not sure how to save this as an xml page (PApopup.xml)such that it can be read by another asp page like this....

<BODY>

<xml src="PApopup.xml" id="dsoEmployee" async="false">
</xml>
<table datasrc="#dsoEmployee" width="100%" border="1">

<thead>
<th>Comments</th>
<th>Price</th>
</thead>

<tr align="left">
<td><span datafld="COMMENTS"></span></td>
<td><span datafld="PRICE"></span></td>
</tr></table>

</BODY>
</HTML>



Please let me know how to do this. Thanks in advance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top