SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CMS produces bad XML, what are my alternatives?

    We are using a CMS for our web site & RSS feeds are provided - one of which works, and one that does not. What I'm trying to accomplish is to supply the feed to Conduit Mobile for our app. It's a third party system as far as the CMS so my hands are pretty tied there. Their tech support has put a ticket in for us but I'd like to look at alternatives since this has held back the mobile app release for several months now.

    My thoughts were to pull the feed daily & put a script or something in place to update the XML & then feed the final output to the app.

    Has anyone else ran across this or have suggestions?

    I can provide the XML if need be.

    Thank you!!!

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,048
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Yahoo provides a great utility for manipulating feeds called YAHOO pipes. using that application it is possible to create a simple cleaner for poorly formated feeds. I did this recently working with some Associated Press feeds that are invalid. You pretty much just need to send the feed through a pipe. The pipe itself will clean up the feed.

    A more involved technique is wrap the feed around script that cleans it up. Depending on how poorly formatted the feed is you might be able to get away with using the Symfony 2 DOM Crawler or query path is another good one. Both of those have "some" capacity to load bad XML and clean it up.

    However, if the problem is the RSS format itself than there isn't any getting around rebuilding the RSS feed. Which is what Yahoo pipes would be very useful for. Otherwise you will need to do it manually with whatever application language you choose. Of course I just suggested the tools I'm familiar with but surely there are others out there for things like manipulating/parsing XML in other languages.
    The only code I hate more than my own is everyone else's.

  3. #3
    SitePoint Member
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you odds! I'm loving Pipes but still no luck with getting Conduit to read the output. Gonna keep playing around with Pipes & see if I can get Conduit to play well with others.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •