SmileyFace
Programmer
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!
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!