Error after url encoding in xml file

Capuchin

New Member
I have created a string \[code\]<?xml version='1.0' encoding='ISO-8859-1'?><response> <content>Question - aa.Reply the option corresponding to your answer(You can vote only once)</content> <options> <option url="http://localhost/poll/index.php?message=vote%3Aaar1%3Asdy&mobile=9747444565" name="sdy"/> <option url="http://localhost/poll/index.php?message=vote%3Aaar1%3Ab&mobile=9747444565" name="b"/> </options></response>\[/code\]The url attribute of the option tag is created from the following php code\[code\] $appUrl."/poll/index.php?message=".urlencode("vote:".$kwd.":".$oopt)."&mobile=".urlencode($_GET['mobile']);\[/code\]But when I convert the same to xml ,I am getting the following error.This page contains the following errors:error on line 1 at column 240: EntityRef: expecting ';'Below is a rendering of the page up to the first error.Why is this happening.I am sure that it is problem of url encoding.So what is the correct way of url encoding.I mean what changes should be applied to the url encoding \[code\] $appUrl."/poll/index.php?message=".urlencode("vote:".$kwd.":".$oopt)."&mobile=".urlencode($_GET['mobile']);\[/code\]Get parameters and value of them are\[code\] $_GET['message'] = "vote:".$kwd.":".$oopt $_GET['mobile'] = 888888errt434\[/code\]
 
Back
Top