0
嗨,我是一個非常大的VB到VB,我不知道如何將結果從XML編寫器返回給客戶端。我已經使用字符串編寫器來創建格式,但我不知道如何以不會給出錯誤的格式返回它。創建一個xml文件,並從Visual Basic中的web服務返回
Dim str_returnstring As New StringBuilder()
Using string_writer As New StringWriter(str_returnstring)
Using writer = XmlWriter.Create(string_writer)
writer.WriteStartDocument(True)
writer.WriteStartElement("playlists")
Dim var_arrayposition = 0
For Each arr_playlistid In arr_playlistids
writer.WriteStartElement("playlist")
writer.WriteStartElement("playlistid")
Dim int2string = Convert.ToString(arr_playlistid)
writer.WriteString(int2string)
writer.WriteEndElement()
writer.WriteStartElement("playlistame")
writer.WriteString(arr_playlistnames(var_arrayposition))
writer.WriteEndElement()
var_arrayposition += 1
writer.WriteEndElement()
Next
writer.WriteEndElement()
writer.WriteEndDocument()
End Using
End Using
能否請您提供全面的功能並闡明您如何設置網絡服務? – tbm0115