JSP动态生成XML 在页面上显示
<%@page language= "java" %>
<%@page contentType= "text/xml; charset=UTF-8"%>
<%
int id;
int price;
String person;
String time;
id=123456;
person="XML";
price=1234;
time="2012-05-21 12:30:00";
%>
<xmp>
<price_table>
<price_info>
<price_id> <%=id%> </price_id>
<price_person> <%=person%> </price_person>
<price> <%=price%> </price>
<time> <%=time%> </time>
</price_info>
</price_table>
</xmp>
[解决办法]
Private Sub CommandButton1_Click()
Dim Row
Dim Level
Dim Title
Dim Describe
Dim WorkNumber1
Dim WorkNumber2
Dim WorkNumber3
'循环取出导出表的值
For Row = 1 To Worksheets("Sheet1").UsedRange.Rows.Count
Level = Worksheets("Sheet1").Range("A2").Value
Title = Worksheets("Sheet1").Range("B2").Value
Describe = Worksheets("Sheet1").Range("C2").Value
If (Level = 1) Then
WorkNumber1 = Worksheets("Sheet1").Range("D2").Value
ElseIf (Level = 2) Then
WorkNumber2 = Worksheets("Sheet1").Range("D2").Value
ElseIf (Level = 3) Then
WorkNumber3 = Worksheets("Sheet1").Range("D2").Value
End If
Next
End Sub