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

XMl Data Island and ASP

Status
Not open for further replies.

vistor

Technical User
Dec 22, 2000
164
US
HI - I've also posted this to the XML forum.

Hi,
I'm trying to take the VB code from an asp page, which is still pulling from a db, and wrap it in a XML internal data island. I've got the table set up after the code but I think the span dataflds in the table and the Response.Write in the code are conflicting, in other words I think I have two output methods? Any tips would be great.


<XML ID=&quot;xmlData&quot;>
<employee_list>
<%
do until rsEmployee.EOF
Response.Write (_
&quot;<first_name>&quot; & rsEmployee(&quot;first_name&quot;) & &quot; &quot; & &quot;</first_name>&quot; &_
&quot;<middle_name>&quot; & rsEmployee(&quot;middle_name&quot;) & &quot;</middle_name>&quot; &_
&quot;<nickname>&quot; & rsEmployee(&quot;nickname&quot;) & &quot;</nickname>&quot; &_
&quot;<last_name>&quot; & rsEmployee(&quot;last_name&quot;) & &quot;</last_name>&quot; &_
&quot;<work_phone>&quot; & rsEmployee(&quot;work_phone&quot;) & &quot;</work_phone>&quot; &_
&quot;<mail_stop>&quot; & rsEmployee(&quot;mail_stop&quot;) & &quot;</mail_stop>&quot; &_
&quot;<email>&quot; & rsEmployee(&quot;email&quot;) & &quot;</email>&quot; &_
&quot;<department_name>&quot; & rsEmployee(&quot;department_name&quot;) & &quot;</department_name>&quot; &_
&quot;<location_name>&quot; & rsEmployee(&quot;location_name&quot;) & &quot;</location_name>&quot;)
rsEmployee.MoveNext
Loop
%>
</employee_list>
</XML>

<%
end if

'close the record set
rsEmployee.close
conn.close
set rsEmployee=Nothing
set conn=Nothing

%>

<table datasrc=&quot;#xmlData&quot; width=&quot;100%&quot; border=&quot;1&quot; datapagesize=&quot;5&quot;>

<thead>
<th>Name</th>
<th>Work Phone</th>
<th>Mail Stop</th>
<th>Email</th>
<th>Department</th>
<th>Location</th>
</thead>

<tr align=&quot;left&quot;>
<td><span datafld=&quot;first_name&quot;></span>
<span datafld=&quot;middle_name&quot;></span>
<span datafld=&quot;nickname&quot;></span>
<span datafld=&quot;last_name&quot;></span>
</td>
<td><span datafld=&quot;work_phone&quot;></span></td>
<td><span datafld=&quot;mail_stop&quot;></span></td>
<td><span datafld=&quot;email&quot;></span></td>
<td><span datafld=&quot;department_name&quot;></span></td>
<td><span datafld=&quot;location_name&quot;></span></td>
</tr>
</table>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top