narasiman rao

narasiman rao

  • NA
  • 519
  • 771.6k

XML parsing: line 22, character 2, whitespace expected

Dec 11 2017 6:03 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>
<table cellspacing="1" cellpadding="1" border="0" width="100%">
<tr style="COLOR: black; FONT-FAMILY: Arial;FONT-SIZE: 10pt; BACKGROUND-COLOR: #f2f2f2;"><td><b>Address : </b>
NO 24 KARTHGIK AVENUE 2ND STREET, TIRUMAGAL ANAGR, CHITLAPAKKAM, CHROMPET, ---,</td>
</tr><tr style="COLOR: black; FONT-FAMILY: Arial;FONT-SIZE: 10pt;
BACKGROUND-COLOR: #f2f2f2;"><td>TAMIL NADU, INDIA - 600064.</td></tr>
</table>
<table WIDTH="100%" CELLPADDING="1" CELLSPACING="1">
<tr style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt;BACKGROUND-COLOR: #f2f2f2;"><td><b>Report Date : </b>2015-05-17 </td><td><b>Optometrist : </b>RAMYA S </td><td><b>Start Time : </b>2015-05-17 08:25 </td>
</tr>
<tr style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt;BACKGROUND-COLOR: #f2f2f2;">
<td>
<b>Consultant : </b>Dr.JAYA PRAKASH V </td></tr>
</table>
<br><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;">
<table border=0 cellSpacing=1 cellPadding=1 width=100%><tr style="COLOR: black; FONT-FAMILY: Arial Black;FONT-SIZE: 8pt; BACKGROUND-COLOR: #e4f5fb"><td>Eye </td><td>Symptom Description </td><td>Duration </td>
<td>Unit </td><td>Onset </td><td>Progression </td><td>Remarks </td><td>Associated Symptoms </td></tr>
<table>'
SELECT t.c.value('.', 'NVARCHAR(MAX)')
FROM @x.nodes('*') t(c)
 
when i run the above code shows error as follows
 
XML parsing: line 22, character 2, whitespace expected
 
Line 22 as follows
 
"onclick="window.parent.document.getElementById("Base_pgContentHolder_pgContent_hdnScrnId").value="EMRFIRST";
 
 
what is the mistake in my line 22. 
 
 
 
 

Answers (1)