Ever seen the error on $subject and looking for answers. Recently, I encountered the error when working with XML parsers in different browsers.
Scenario: I was seeing no issue with Firefox but with Chrome I kept getting the error shown in $subject.
Cause: After some debugging I found that this is due to the XML Parser used in chrome. After a certain query, if my result set was empty, my program was sending back and empty string (“”) back to the browser. When this is parsed for XML, Chrome threw the error shown in $subject.
Solution: If you are parsing for XML, send XML. When my result set was empty now I sent back an empty parent xml tag (i.e. <result></result>) and the problem was solved. Hope this helps anyone who comes across this issue.
This can also be caused by a non text value present in xml.
like abc & acd
Interesting find. I didn’t know that.