Saving Url inside xml element

I got this error An error occurred while parsing EntityName. Line 1, position 61.while saving this url http://www.autorentalnews.com/t_inside.cfm?action=news_pick&storyID=36229

I don’t know why I can’t save url like this inside xml file

The element wrote like this:

<New>
<ID>8b269f29-69a1-4551-8d72-4602df4e2c7e</ID>
<Title>Industry Rallies Against Ariz. Rental Car Tax</Title>
**<SourceUrl>http://www.autorentalnews.com/t_inside.cfm?action=news_pick&storyID=36229</SourceUrl>**

any suggestions!

+3
source share
3 answers

you get this error due to &- either replace it with &amp;, or save your urls in the cdata section - i.e.<![CDATA[your-url-here]]>

+12
source

You are killing you. Put it in the CDATA section.

+1
source

'&' XML , . XML '&' . "storyID" , . "=" , "=" ";". escape- '&' '& amp;', . CDATA , , .

(- , , stackoverflow , XML/HTML).

0
source

Source: https://habr.com/ru/post/1735301/


All Articles