Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Class "Format" ignoring xml prefixed elements
  • hi, am using the Format class to parse a gdata xml response from youtube Api, the response contain many prefixed xml elements like media:thumbnail or media:title ..., 
    the issue is that elements are ignored and not returned when using Format::to_array()  in the array result!!

    example  :
    	    $video_id = 'pRpeEdMmmQ0';

    $request = Request::forge("http://gdata.youtube.com/feeds/api/videos/$video_id?v=2",'curl');

    $response = $request->execute()->response();

    $content = $response->body();

    Debug::dump($response); // return the response object containing the full xml content

    $data = Format::forge($content,'xml')->to_array();

    Debug::dump($data); // ignore the prefixed elements


  • HarroHarro
    Accepted Answer
    The format class doesn't support XML namespaces at the moment.

    Please create an issue for this at https://github.com/fuel/core/issues, with this use-case.
  • thank you, the issue were created.at https://github.com/fuel/core/issues/1442

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion