dhtmlxGrid:problem with xmlstring load

I am getting javascript error when loading from xml string. If I copy same xml in a file and call grid.loadXML(“file.xml”), it woks fine.

How do I load grid from xml string?



Following gives javascript error

mygrid_62.parse("<?xml version="1.0" encoding="UTF-8"?>

1633

1634



1635 identifier2

1636 multi choice label1,multi choice label2

1637 11/20/2008

1638

1639

1640 identifier

1641 multi choice label1

1642 11/21/2008

1643

1644

1645");

Beware, that used js string must not violate js script rules, in case above , it seems that data occupy few code lines, which break js string recognition.
Use single line string, or place it inside some temporary container.

<?xml version="1.0" encoding="UTF-8"?>
1633
1634

1635 identifier2
1636 multi choice label1,multi choice label2
1637 11/20/2008
1638
1639
1640 identifier
1641 multi choice label1
1642 11/21/2008
1643
1644


mygrid_62.parse(document.getElementById(“xml_here”).value);