通过jsp编写XML

时间:2014-09-15 11:18:20

标签: xml jsp scriptlet

<%
namespace WritingXml {       
    XmlWriter xmlWriter = XmlWriter.Create("NFrame.xml");              
    xmlWriter.WriteStartDocument();             
    xmlWriter.WriteStartElement("device");              
    xmlWriter.WriteStartElement("device");             
    xmlWriter.WriteAttributeString("timestamp", "time");             
    xmlWriter.WriteString("id");               
    xmlWriter.WriteEndDocument();             
    xmlWriter.Close();         
};
%> 

我在JSP页面中使用此代码进行XML编写,但是我在插入;以完成局部变量声明时遇到错误

0 个答案:

没有答案