easy_life
asked on
Retrieve data from database and insert the XML content to an XML Reader.
I am getting this error "There is an unclosed literal string. Line 1, position 2048." while reading from the XML reader.
If I read small amount of data it is working fine but if I read more than 2048 characters data I am getting this error. Can anyone tell me, how can I solve this problem?
I use the following code for XML reader.
If I read small amount of data it is working fine but if I read more than 2048 characters data I am getting this error. Can anyone tell me, how can I solve this problem?
I use the following code for XML reader.
Private Sub GenerateXMLReport(ByVal query As String)
Dim reader As System.Xml.XmlReader
reader = CreateXMLReader(query, _cs)
Dim xmlDoc As New System.Xml.XmlDocument()
Dim root As Xml.XmlElement = xmlDoc.CreateElement("Report")
xmlDoc.AppendChild(root)
Dim node As Xml.XmlNode = xmlDoc.ReadNode(reader)
While node IsNot Nothing
root.AppendChild(node)
node = xmlDoc.ReadNode(reader)
End While
xmlDoc.Save(_rootDir & "\HistoryReport.xml")
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.