I am getting following issues when XML file open in the browser:-

This page contains the following errors:

error on line 11 at column 16: xmlParseEntityRef: no name

Below is a rendering of the page up to the first error.

enter image description here


Problem: An XML parser returns the error "xmlParseEntityRef: noname"

Cause: There is a stray ‘&’ (ampersand character) somewhere in the XML text eg. some text & some more text

Solution 1:

Remove the ampersand.

Solution 2:

Encode the ampersand (replace the ampersand '&' character with '&amp;',  '<' with '&lt;' and '>' with '&gt;' ) 
Remember to Decode when reading the XML text.

Solution 3:

Use CDATA sections (text inside a CDATA section will be ignored by the parser.) eg. <![CDATA[some text & some more text]]>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.