日期:2014-05-17 浏览次数:20880 次
<% Set oDoc = CreateObject("Msxml2.DOMDocument") With oDoc .async = False .validateOnParse = False .preserveWhiteSpace = False .resolveExternals = False End With Set oRoot = oDoc.createElement("tiltviewergallery") Set oDoc.documentElement = oRoot Set oPhotos = oDoc.createElement("photos") Do While Not rs.EOF Set oPhoto = oDoc.createElement("photo") oPhoto.setAttribute "imageurl", "imgs/1.jpg" oPhoto.setAttribute "linkurl", "http://www.google.com" Set oNode = oDoc.createElement("title") oNode.text = "title" oPhoto.appendChild oNode Set oNode = oDoc.createElement("description") oNode.text = "description" oPhoto.appendChild oNode oPhotos.appendChild oPhoto rs.MoveNext Loop oRoot.appendChild oPhotos oDoc.scave "c:\xxx\xxx.xml" Response.ContentType = "text/xml" Response.Write oDoc.xml %>