Forums

How to develop a parser to call XML files into my websit (2 posts)

  1. yahind
    Member
    Posted 3 years ago #

    Dear friends,

    Can anybody help me, how to develop a parser in wordpress to call XML format files into my website from a desired ftp location, Below is the sample format I have received from the agency. Please help me, as I am new to Word Press Community.

    Regards,

    http://www.YaHind.Com
    http://yahind.com/newsportal/

    (Sample file attached with its details below)
    I am enclosing some XML test file for your reference and also mentioning below the naming format and different category we use, you have to develop a parser at your end to call these files into your website from a desired ftp location.

    We follow yyyymmdd-hhmmss.xml (20080218-130137.xml) naming format for our XML files.

    We have two main <cats> 'India' & 'International'
    With 'India' <cats> we always associate 'National' as default <subcats> and other
    related <subcats> are separated by a comma

    For Example
    if a story is only of National Issue then

    <cats>India</cats>
    <subcats>National</subcats>

    is used

    otherwise if it related to business then

    <cats>India</cats>
    <subcats>National,Business</subcats>

    and with travel & Entertainment related

    <cats>India</cats>
    <subcats>National,Entertainment,Travel</subcats>

    List of <subcats>, we use with <cats>India</cats>:

    Art - Culture
    Business
    Diaspora
    Education
    Entertainment
    Health
    National
    Politics
    Religion
    Sports
    Sci-Tech
    Travel

    With International <cats> we use either of listed <subcats>

    <cats>International</cats>
    <subcats>Nepal</subcats>

    <cats>International</cats>
    <subcats>Australasia</subcats>

    List of <subcats>, we use with <cats>International</cats>:
    Africa
    Americas
    Asia
    Australasia
    Europe
    Gulf-Middle East

  2. tsalagi_red
    Member
    Posted 3 years ago #

    I found this short article on how to parse xml with php.

    http://www.jauhari.net/how-to-parsing-a-simple-xml-document-in-php.jsp

    I have never done anything like this myself, so I can't really answer any questions about it. For instance, I'm not sure how to even call the xml file into the parser script. Any ideas on how to actually use this example?

Topic Closed

This topic has been closed to new replies.

About this Topic