I am creating a XML document which opens fine in IE. Implies MSXML
thinks it is a well formed document.
But when I try to load this document in VB.net using the following
code
Dim doc As New XmlDocument
doc.Load("C:\Projects\SQLXML\corc.xml")
I get the following error:
"System.Xml.XmlException: An unexpected end of file parsing CDATA has
occurred. Line 6, position 1.
at System.Xml.XmlScanner.ScanCData()
at System.Xml.XmlScanner.ScanMarkup()
at System.Xml.XmlTextReader.ParseTag()
at System.Xml.XmlTextReader.ParseBeginTagExpandCharEn tities()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlValidatingReader.ReadNoCollectTextTo ken()
at System.Xml.XmlValidatingReader.Read()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader,
Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at SQLXML.Form1.Button4_Click(Object sender, EventArgs e) in
C:\Projects\SQLXML\Form1.vb:line 211"
Here is my document.
<?xml version="1.0" encoding="utf-8" ?>
- <corc xmlns:sql="urn:schemas-microsoft-com:xml-sql"
xmlns="http://tempuri.org/corc.xsd">
- <item projectID="19182">
<JIFNumber>97-545-0100-S</JIFNumber>
<Title>PULSAR MAX II brochure (Spanish)</Title>
<Group>Brady</Group>
<Category>Product brochure</Category>
- <Description>
- <![CDATA[
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss\ fprq2\fcharset0
Tahoma;}{\f1\fnil\fcharset0 Tahoma;}}
{\colortbl ;\red153\green51\blue102;}
\viewkind4\uc1\pard\lang1033\b\f0\fs21 PULSAR MAX II brochure\b0\fs17
(\cf1\b Spanish\cf0\b0\f1\par
}
]]>
</Description>
<ImageFileName>97-545-0100-S.jpg</ImageFileName>
<scoutFeaturedItem>0</scoutFeaturedItem>
- <Characterictic>
<CharacteristicID>2</CharacteristicID>
<CharactericticValue>flying</CharactericticValue>
</Characterictic>
</item>
- <item projectID="19183">
<JIFNumber>99-919-901</JIFNumber>
<Title>Guidant Notepad (OBSOLETE 7/02 - REPLACED WITH
M9-002-00)</Title>
<Group>CRM</Group>
- <Description>
- <![CDATA[ Guidant Notepad (OBSOLETE 7/02 - REPLACED WITH M9-002-00)
]]>
</Description>
<scoutFeaturedItem>0</scoutFeaturedItem>
</item>
- <item projectID="19184">
<JIFNumber>97-718-1102</JIFNumber>
<Title>CONTAK RENEWAL CD ROM</Title>
<Group>Heart Failure</Group>
- <Description>
- <![CDATA[ CONTAK RENEWAL CD ROM
]]>
</Description>
<scoutFeaturedItem>0</scoutFeaturedItem>
</item>
- <item projectID="19186">
<JIFNumber>99-940-102</JIFNumber>
<Title>NASPE 2002 Allied Professional Invitations</Title>
<Group>CRM</Group>
- <Description>
- <![CDATA[ NASPE 2002 Allied Professional Invitations
]]>
</Description>
<scoutFeaturedItem>0</scoutFeaturedItem>
</item>
</corc>
Any help would be appreciated.
Thanks