Taking in XML Data
Posted: 16 May 2008 05:08 PM   [ Ignore ]  
Grad Student
Rank
Total Posts:  33
Joined  12-02-2006

I’m considering adding some job postings to my site. I can get a XML request (URL) that returns something like the code below. How would I parse this info...would the magpie plugin be of some help?

<?xml version="1.0" encoding="UTF-8" ?>
<response>
    <
query>java</query>
    <
location>austin, tx</location>
    <
dupefilter>true</dupefilter>
    <
highlight>false</highlight>
    <
totalresults>547</totalresults>
    <
start>1</start>
    <
end>10</end>
    <
results>
        <
result>
            <
jobtitle>Java Developer</jobtitle>
            <
company>XYZ Corp.</company>
            <
city>Austin</city>
            <
state>TX</state>
            <
country>US</country>
            <
source>Dice</source>
            <
date>Tue, 13 May 2008 17:04:42 GMT</date>
            <
snippet>looking for an object-oriented Java Developer... Java Servlets, HTML, JavaScript,
            
AJAX, Struts, Struts2, JSF) desirable. Familiarity with Tomcat and the Java...</snippet>
            <
url>http://www.xyz.com/viewjob?jk=12345&xyzpubnum=11111111111111</url>
            
<onmousedown>indeed_clk(this,'0000');</onmousedown>
            <
latitude>30.27127</latitude>
            <
longitude>-97.74103</longitude>
            <
jobkey>12345</jobkey>
        </
result>
        ...
    </
results>
</
response>

Profile
 
 
Posted: 16 May 2008 11:05 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12918
Joined  05-15-2004

Obviously, you need to parse this XML. You can either use pure PHP for that, or make use of the built-in XML Parser class. Either way, it will take a bit of development on your part to process.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 17 May 2008 12:11 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  33
Joined  12-02-2006

Found a plugin that looks like it’ll work pretty well.

XMLGrab Plugin

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 60731 Total Logged-in Users: 25
Total Topics: 73200 Total Anonymous Users: 20
Total Replies: 394764 Total Guests: 465
Total Posts: 467964    
Members ( View Memberlist )
Newest Members:  rezvani63LambergbcurranChethansisiharmonijoe_carneypsykonautJitsunROPasterfredpws