Results 1 to 9 of 9
  1. #1
    Newbie
    Join Date
    October 14th, 2006
    Posts
    2
    Datafeeds: XML Format.. How to..
    I just joined a new aff program and in the welcome e-mail, they said they provide a sophisticated datafeed in XML format...

    I tried to do some searches, but what does one do with an XML datafeed? Do I need a special program that's available somewhere to parse and work with it?

    Is there an explanation or step by step tutorial somewhere on the net for the total non-techy person like me?

    Thanks in advance!

  2. #2
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    I use XMLReader which is available in PHP5. Most servers will have PHP4, so this isn't readily available at the moment. It might require some upgrades. The nice thing about it is it reads an XML document without storing the entire thing in memory. This is really important for huge XML files in the 1gb+ range. If you search the net you can probably find some good examples for using it to parse an XML document.

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  3. #3
    Newbie
    Join Date
    October 14th, 2006
    Posts
    2
    Thanks! I have a feeling I'm going to be sorry I asked. Though I've worked with PHP and understand it for the most part (most just web programming for things like Wordpress or phpBB), I have no clue what needs to be done looking at the page you linked to there.

    Am I creating a page using some of the example code they put down there in comments? Do I need to create a MySQL database?

    If I have an XML Feed.. what do I do with it?

    And I'm scratching my head trying to figure out why an aff program would even provide it if it requires such technical savvy. LOL

    I think I'll contact them and see what they say too.. but if you don't mind taking the time to spell it all out for a non-techy affiliate, that would be super appreciated.

    ...do all affiliates know php this well?

  4. #4
    ABW Ambassador bettylou's Avatar
    Join Date
    December 27th, 2005
    Location
    Indiana
    Posts
    595
    Hi Sam,

    I work with XML documents with Microsoft Excel Pro. I am pretty sure it has to be the professional one though and not just the regular excel to be able to work with XML. After I have it loaded into excel, I take out the fields that I don't need and load it into my MySQL database.

    As far as using PHP, affiliates don't need to know anything about PHP if they choose not to. It is up to you, depending on how you want your site to be set up and so forth. I personally use PHP and MySQL.

    Let me know if I can do anything to help. I am by no means an expert but I will do what I can.

  5. #5
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    Maybe check a few scripts here:

    http://www.hotscripts.com/PHP/Script...s/XML_and_PHP/

    See what you can find that will display XML as HTML. I'm sure there are a number of tools that will generate HTML pages from an XML source.

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  6. #6
    Newbie
    Join Date
    June 3rd, 2007
    Location
    the Netherlands
    Posts
    46
    Hi Sam,

    Not sure if you already discovered the secrets of XML but I hope to shed some light on it

    XML is a way to format a file according to standard rules. Because the structure is in a startd form the content of the file can be read by any application that is capable of converting the file.

    The XML file is structered in a way like this
    <name>value</name>

    it is like in php with a variable and it's value. So having a affiliatefile in XML makes it easy to read the values of the names like product=xyz price=$whatever image=niceone.jpg. You can use a phpconverter for it or you could choose to store the file in a database and use it in that way.

    I hope this helps a bit

  7. #7
    Member
    Join Date
    December 6th, 2006
    Location
    na
    Posts
    173
    The PHP page on parsing XML : http://www.php.net/xml

    Also try Magpie RSS, which makes it easier to do these things as well.

  8. #8
    Newbie
    Join Date
    June 19th, 2007
    Posts
    6
    Quote Originally Posted by bettylou
    Hi Sam,

    I work with XML documents with Microsoft Excel Pro. I am pretty sure it has to be the professional one though and not just the regular excel to be able to work with XML. After I have it loaded into excel, I take out the fields that I don't need and load it into my MySQL database.
    Exactly what is "Microsoft Excel Pro"? Plain old Excel has XML tools and can directly open/saveas XML, at least since version 2002. Programmatically,you can use VBA to work with XML by adding a reference to an XML parser like MSXML.

    http://msdn2.microsoft.com/en-us/library/aa140066(office.10).aspx

  9. #9
    Newbie
    Join Date
    December 10th, 2005
    Posts
    7
    Sam,

    Answer partly depends on structure of xml file, or how complicated the data inside is. If it looks roughly like this:

    <catalog>
    <item>
    <name>bla bla</name>
    <id>323452</id>
    <link>http://www.somewhere.net/something.php</link>
    </item>
    <item>
    <name>...</name>
    </item>
    ... more items
    </catalog>

    then its just an xml representation of a csv file, ie tabular data and should be easy to convert to a csv (I assume you know how to handle csv). However if within <item> and </item> tags you have other tags with their own sub-tags then its structured data, not just tabular. For example I had a tickets program that had event groups, within them events and then within events seat categories. If it is structured data, you'll need some php skills and several tables in db to turn it into well structured site. If you don't have the skills, you can always try rentacoder or a similar service.

  10. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. why XML products feed and seach engine format?
    By ivy520ee in forum Newbie Affiliate FAQs & Helpful Articles
    Replies: 0
    Last Post: January 20th, 2014, 12:46 AM
  2. Yahoo Store XML to ShareASale-format CSV - Script Needed
    By Geno Prussakov in forum Programming / Datafeeds / Tools
    Replies: 9
    Last Post: June 26th, 2008, 07:11 AM
  3. xml vs. datafeeds ....are they the same?
    By NewOrleans Rookie in forum Programming / Datafeeds / Tools
    Replies: 4
    Last Post: January 8th, 2004, 06:53 PM

Posting Permissions

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