TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
narasiman rao
NA
519
768.4k
XML parsing: line 6, character 2, white space expected
Dec 11 2017 7:26 AM
DECLARE @x XML = '<table WIDTH="100%" CELLPADDING="1" CELLSPACING="1">
<tr style="COLOR:black; FONT-FAMILY: Arial;FONT-SIZE: 10pt; BACKGROUND-COLOR: #f2f2f2;">
<td><b>Medical Record No. : </b>1165677</td><td><b>Patient Name : </b>MASTER. SURYANARAYANAN T S </td><td><b>Age : </b>16 Year(s)</td><td><b>Sex : </b>male
</td></tr></table>
<A HREF="#" TARGET="_top" onContextMenu="event.returnValue=false;
"onclick ="window.parent.document.getElementById("Base_pgContentHolder_pgContent_hdnScrnId").value="EMRFIRST";
window.parent.document.getElementById("imgOpenHistory").click();return false;">
<b>Main Complaints</b></a>
</table>'
SELECT t.c.value('.', 'NVARCHAR(MAX)')
FROM @x.nodes('*') t(c)
when i run the above shows error as follows
XML parsing: line 6, character 2, whitespace expected
line 6 as follows
"onclick ="window.parent.document.getElementById("Base_pgContentHolder_pgContent_hdnScrnId").value="EMRFIRST";
window.parent.document.getElementById("imgOpenHistory").click();return false;">
Reply
Answers (
2
)
XML parsing: line 22, character 2, whitespace expected
XML parsing: line 14, character 49, whitespace expected