Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress How to Build a WordPress Plugin Connecting WordPress Plugins with 3rd Party APIs Getting and Storing a JSON Feed

Jonathan McClintock
Jonathan McClintock
7,186 Points

What about storing an XML file?

I need to pull data out of an XML file instead of a JSON file. I am currently using SimpleXML and can pull out the data I need etc. but when trying to follow through and save a local copy in the database options table I just keep getting NULL for my $json_url (mine is actually called $feed_url.)

I have tried many things but cant get it into the database.

1 Answer

Jonathan McClintock
Jonathan McClintock
7,186 Points

Wow...I feel like an idiot...Ignore this.

The problem was I was using a different copy of my plugin file. Somehow I managed to open my backup and start editing that...