Blogspot backup XML parserSeptember 22, 2012
Carlos Eriksson, Fiinixdesign, announced earlier this week that he wanted to leave blogspot for his own domain/hosting/blogplatform. And he threw out a request if I could build him a parser for his posts from the backup XML file that blogspot provides.
So now during Saturday morning I put together a small class to parse the XML. Nothing fancy, but it does the job 🙂
Excerpt from the documentation:
/** * Blogspotparser * * Blogspotparser is a class that takes the backup xml file from blogspot and parses it * into a basic array, returning the posts as is, with html markup or as clean text. * * @author : Benjamin Horn * @project : Fiinixdesign.eu * @file : class.blogspot.parser.php * @version : 1.0.0 * @created : 2012-09-22 * @updated : 2012-09-22 * * @usage : * * $p = new Blogspotparser( $XMLDATASTRING ); // Initiate class * $p->fetch_entries_clean(); // Output posts as clean data * $p->fetch_entries(); // Output posts with original markup * $p->fetch_amount_of_entries(); // Fetch amount of posts in backup * */
Get it from GitHub