Is there anyway to get the XML string representation from the
XmlTextWriter object?
I created a function to create an XML using this object, but I need to
send back an XML as the return value of this function. But I am not
sure how to do this.
Sub getXML()
Dim objXMLWriter As New System.Xml.XmlTextWriter(w,
Text.Encoding.UTF8)
objXMLWriter.WriteStartDocument()
objXMLWriter.WriteStartElement("firstElement")
objXMLWriter.WriteStartElement("SecondElement")
objXMLWriter.WriteElementString("ThirdELement", "Just text")
objXMLWriter.WriteElementString("ThirdELementL1", "Text
again")
objXMLWriter.WriteEndElement()
objXMLWriter.WriteStartElement("sdsd")
objXMLWriter.WriteAttributeString("timeVisited",
DateTime.Now.ToString())
objXMLWriter.WriteElementString("ip", "14.23.422.12")
objXMLWriter.WriteEndElement()
objXMLWriter.WriteEndElement()
objXMLWriter.WriteEndDocument()
objXMLWriter.Close()
End Sub
Is there anyway to get a string representation from the XmlTextWriter
class???