1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Xml Data To Wordpress

Discussion in 'HTML & JavaScript' started by useit4u, Nov 16, 2012.

  1. useit4u

    useit4u Newbie

    Joined:
    Apr 12, 2009
    Messages:
    24
    Likes Received:
    3
    Hi
    I need help to figure this out and how to do it. I have large data in xml files(small files) 200 gb total. I would like to creat a website that can display such data. I am thinking of doing xml to database and then display that database to WordPress blog. or creat xml import plugin that can do such.Please advise if there any other easier way. and how to do it aswell.
    Thanks

    I am not sure to post this here or not. please let me know if this is the right place to post.
     
  2. teamrecon

    teamrecon Registered Member

    Joined:
    Jan 15, 2008
    Messages:
    96
    Likes Received:
    37
    If you want to show the xml info as blog posts or pages , then you will need to import the data into the wordpress database, using the post or page tables, the wordpress api allows you to do this using wp_insert_post( $my_post )

    I have done this with the laterooms xml feed to show as blog posts ;-)
     
    Last edited: Nov 16, 2012
  3. useit4u

    useit4u Newbie

    Joined:
    Apr 12, 2009
    Messages:
    24
    Likes Received:
    3
    what will you charge to set me up such thing???
     
  4. gullsinn

    gullsinn Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 24, 2009
    Messages:
    2,429
    Likes Received:
    2,210
    Gender:
    Male
    Occupation:
    Jobless :D
    Location:
    Graveyard
    Home Page:
    yes teamrecon is right
     
  5. Gogol

    Gogol Elite Member

    Joined:
    Sep 10, 2010
    Messages:
    3,063
    Likes Received:
    2,872
    Gender:
    Male
    This would have been really tough if you had large files! wp_insert_post() is the function to insert the post as someone already suggested.. You need to create a small plugin or a custom page template which would read all the files from the folder one by one and insert them. Best is to do 10 - 20 xml files in one run and save the last update in a file / db. Make it a cron and run it every 10 mins or so.