I have some code below.
Dim newroot As XElement
newroot = <msg><tag1>Test</tag1><tag2>Successful</tag2><id>3</id></msg>
Dim ThisString As String
ThisString = [url removed, login to view]
Dim ThisRoot As XElement
ThisRoot = [url removed, login to view](New [url removed, login to view](ThisString))
MsgBox([url removed, login to view])
However; there is a problem. It gives a runtime error. The purpose of this sample is there are many cases where the XElement is saved to a database then retrieved again. When its retrieved; then when trying to convert back to xml; it gives a runtime error. That needs to be fixed.
The source code only for the above code to fix the bug so it can convert from text to xml even when text was originally an xelement (so I can get the information to a database). I will not accept saving the file first. Because if its running on a server; then there has to be a better way than having to save the file then using the .Load (FilePath).
Windows XP, Vista.