[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 423
  • Last Modified:

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.
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

Open in new window

0
easy_life
Asked:
easy_life
1 Solution
 
jjardineCommented:
Have a look at these posts regarding this topic:  http://forums.asp.net/t/1191911.aspx  

I hope that helps.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now