Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 xml datatype

Author  Topic 

desikankannan
Posting Yak Master

152 Posts

Posted - 2010-07-08 : 10:59:16
Hi try to insert the below ,but it throws the error
XML parsing: line 3, character 47, end tag does not match start tag,pls guide me to insert the data in xml format, its urgent

INSERT INTO BOOKS(Title,tableofcontents)
values('mynewbook',
cast('
<Chapters>
<Chapter><Title>Chapter 1</Title><Page>1</page></Chapter>
</Chapters>' as XML))


Desikankannan

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2010-07-08 : 11:04:49
XML is case sensitive. Either make your page element lower case, or keep it mixed case just like the other element names.
It affects both starting elemtent and closing element.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -