You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Ashish Sharma <as...@gmail.com> on 2009/01/08 07:46:32 UTC

MessageBundleParser.php Error

Hi All, I just started playing around with Shindig on my localhost. I am
very new to everything and though I am going through the documents, there
are some very basic doubts I have with which I hope you can help. I have
been trying to render some Google Gadgets through my local Shindig gadget
server. (i.e. getting the source XML file, copying it to the htdocs
directory and then using shindig) Though some worked fine, I am getting an
error through MessageBundleParser.php with many of them. It would be very
helpful if these basic question can be answered: 1. Can all Google gadgets
be rendered through Shindig Server? 2. If no, why and what changes need to
be made in the gadget file. Also I felt there is something wrong with this
part of the code. The error i got was "SimpleXMLElement expected at line
35": public function parse($xml) { $doc = @simplexml_load_string($xml);
return $this->getMessages($doc); } public function getMessages(*
SimpleXMLElement* $doc) { if (! $doc) { throw new Exception("Invalid XML
structure in message bundle"); }... I changed the function definition to
this to make it run fine (i.e. give the "Invalid XML.." exception) :  public
function getMessages($doc) { if (! $doc) { ... Thanks, Rahul

Re: MessageBundleParser.php Error

Posted by "Pan Jie (潘劼)" <pa...@google.com>.
 "SimpleXMLElement expected at line 35"This is caused by a bug which can be
reproduced when interpreting an ill-formed gadget xml.
I have created a patch to fix this issue.
You can find the bug here: https://issues.apache.org/jira/browse/SHINDIG-839

On Thu, Jan 8, 2009 at 2:46 PM, Ashish Sharma <as...@gmail.com>wrote:

> Hi All, I just started playing around with Shindig on my localhost. I am
> very new to everything and though I am going through the documents, there
> are some very basic doubts I have with which I hope you can help. I have
> been trying to render some Google Gadgets through my local Shindig gadget
> server. (i.e. getting the source XML file, copying it to the htdocs
> directory and then using shindig) Though some worked fine, I am getting an
> error through MessageBundleParser.php with many of them. It would be very
> helpful if these basic question can be answered: 1. Can all Google gadgets
> be rendered through Shindig Server? 2. If no, why and what changes need to
> be made in the gadget file. Also I felt there is something wrong with this
> part of the code. The error i got was "SimpleXMLElement expected at line
> 35": public function parse($xml) { $doc = @simplexml_load_string($xml);
> return $this->getMessages($doc); } public function getMessages(*
> SimpleXMLElement* $doc) { if (! $doc) { throw new Exception("Invalid XML
> structure in message bundle"); }... I changed the function definition to
> this to make it run fine (i.e. give the "Invalid XML.." exception) :
>  public
> function getMessages($doc) { if (! $doc) { ... Thanks, Rahul
>



-- 
Warm Regards,

Pan Jie
panjie@google.com