Jump to:

3430 Posts in 1057 Topics by 734 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Problem using simplexml in controller php

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1137 Views
  • D&B
    Avatar
    Community Member
    4 Posts

    Problem using simplexml in controller php Link to this post

    I want to use simplexml in my controller php, but I get an error (Node no longer exists).

    I suspect ->children() is calling the silverstripe function rather than the simplexml children() function.

    Is there any way around this?

    class TypeTester_Controller extends Page_Controller {

    function MyFunction() {

    $xml = simplexml_load_file('myXML.xml');

    foreach($xml->library->children() as $child) {
    ...
    }
    }
    }

    Thanks

    1137 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.