I would like to export(convert) XmlTextWriter output data to string variable.My code as follows :\[code\] '' write data as xml Dim objX As New XmlTextWriter(Response.OutputStream, Encoding.UTF8) objX.WriteStartDocument() objX.WriteStartElement("Transaction") objX.WriteAttributeString("version", "1.0") objX.WriteElementString("id", "12") objX.WriteElementString("token", "4534gfdgdfhfst") objX.WriteEndElement() objX.WriteEndDocument() objX.Flush() objX.Close() Response.End()\[/code\]