Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The reference to entity "f" must end with the ';' delimiter

Tags:

android

I have the following xml file in my res/raw folder -

Title of RSS http://urlofthething.com

    <item>
        <title>Title</title>
        <description>The description goes here</description>
        <link>http://someurl.someurl.com/data/Content/1771370477</link>
        <guid>15626277</guid>
        <pubDate>28 Jan 2011 19:07:00 +0000</pubDate>
        <media:group>
            <media:content medium="video" duration="273"
                url="http://something.someurl.com/access/choice/u/0/1/15626277?rtspdirect=true&f=001110786488&stylesheet=mobile">

            </media:content>
        </media:group>
    </item>

    <item>
        <title>Title</title>
        <description>The description goes here</description>
        <link>http://someurl.someurl.com/data/Content/1771370477</link>
        <guid>15626277</guid>
        <pubDate>28 Jan 2011 19:07:00 +0000</pubDate>
        <media:group>
            <media:content medium="video" duration="273"
                url="http://something.someurl.com/access/choice/u/0/1/15626277?rtspdirect=true&f=001110786488&stylesheet=mobile">

            </media:content>
        </media:group>
    </item>
</channel>

and I am using

InputStream ins = getResources().openRawResource(R.raw.myxmlfile);

to read the file.

However on the line -

url="http://something.someurl.com/access/choice/u/0/1/15626277?rtspdirect=true&f=001110786488&stylesheet=mobile">

i am getting the following error -

The reference to entity "f" must end with the ';' delimiter
like image 742
Arunabh Das Avatar asked Feb 27 '11 08:02

Arunabh Das


2 Answers

Since this is in XML, the parser expects the & symbol to precede entities such as &quot;.

Try replacing your & with &amp; and everything should be fine: this will be understood as being a real ampersand by the parser.

like image 125
Romain Avatar answered Oct 13 '22 00:10

Romain


Try to use &amp; instead of & in URL.

like image 28
duri Avatar answered Oct 12 '22 23:10

duri