Error messages in XML

Below are error messages are coming while laoding the xml.XMLDocument.loadXML(xml)

alert(XMLDocument.parseError.line)…coming 0

alert(XMLDocument.parseError.srcText)…coming blank

alert(XMLDocument.parseError.linePos)-----coming undefined.

Any Luck …