Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 17th Nov 2015, 01:47 PM   #1
Active Warrior
 
Join Date: 2014
Posts: 90
Thanks: 1
Thanked 3 Times in 3 Posts
Default
XML feed help please!! urgent....
Share on: 
fb share twitter share gplus share more share

Ok, so I am getting a feed that has about 2,000 listings on it, it is very important for my business....

I am having to parse out the title of each listing into city and state, as there is actually not a field separate for those 2 items.

There is one big problem with the feed however, the feed is not consistent... Sometimes the city is first in the title, and sometimes the state is first in the title... This is making a lot of the 2,000 listings pop up on incorrect city and state pages on my website...

can someone help me? how can I fix this?

I need GOOD real estate links for my nationwide real estate site...

Mobile Homes for sale
austine3859 is offline  
Unread 17th Nov 2015, 02:07 PM   #2
Conceited Know-It-All
 
kilgore's Avatar
 
Join Date: 2014
Location: Amurrica
Posts: 952
Thanks: 465
Thanked 1,136 Times in 503 Posts
Default
Re: XML feed help please!! urgent....
Share on: 
fb share twitter share gplus share more share

Lots of ways to approach this one. But really, you might want to post this in the "Programming" subforum.

Anyway, I'd probably start by doing something like creating an array of states. Then I'd do a search of your city/state field against this list of states. If there's a match, I'd assume that's the state and then I'd assume the rest of the text is the city. If I didn't get a match, I'd flag the record as an error so that I could manually edit it. Something like that at any rate.

But anyway, it's impossible to really say without seeing your data or knowing what tool(s)/language(s. you're using.

kilgore is offline  
Unread 17th Nov 2015, 03:24 PM   #3
Active Warrior
 
Join Date: 2014
Posts: 90
Thanks: 1
Thanked 3 Times in 3 Posts
Default
Re: XML feed help please!! urgent....
Share on: 
fb share twitter share gplus share more share

my website is mobilehomesforsale.com

Here is the feed im using...
https://www.vmfhomes.com/Content/Feeds/rss.xml

I need GOOD real estate links for my nationwide real estate site...

Mobile Homes for sale
austine3859 is offline  
Unread 17th Nov 2015, 03:56 PM   #4
HyperActive Warrior
 
Join Date: 2008
Location: Romania
Posts: 361
Thanks: 6
Thanked 59 Times in 52 Posts
Default
Re: XML feed help please!! urgent....
Share on: 
fb share twitter share gplus share more share

As kilgore suggested the best approach is to have an array with state values and do a simple check. If the first item is in array, then it is a state, if not it is a city.

Automatically add affiliate links in your website content with Auto Affiliate Links
thedark is offline  
Unread 17th Nov 2015, 05:03 PM   #5
Active Warrior
 
Join Date: 2014
Posts: 84
Thanks: 5
Thanked 11 Times in 10 Posts
Default
Re: XML feed help please!! urgent....
Share on: 
fb share twitter share gplus share more share

Are you sure your code is ok ?
I just tried that feed and it looks state is always in first position.
Try this [PHP] <?php $xml = simplexml_load_file("https://www.vmfhomes.com/Content/Feeds/rss. - Pastebin.com - it will echo all items where state is not found.
robomedia is offline  
Unread 17th Nov 2015, 05:20 PM   #6
Active Warrior
 
Join Date: 2014
Posts: 90
Thanks: 1
Thanked 3 Times in 3 Posts
Default
Re: XML feed help please!! urgent....
Share on: 
fb share twitter share gplus share more share

Hmm... this is all great info.. I am trying to learn as fast as I can, also going to forward this to my developer guy as a lot of this is over my head...

However, you can view my state page of Texas for example
Mobile Homes For Sale In Texas

Scroll down, and you can see that many listings show up in texas that should not be showing up on this state page....

I need GOOD real estate links for my nationwide real estate site...

Mobile Homes for sale
austine3859 is offline  
Unread 18th Nov 2015, 02:46 AM   #7
Bananas are Yellow!
Registered Member
War Room Member
 
David Beroff's Avatar
 
Join Date: 2013
Location: Wyoming, PA, USA
Posts: 1,046
Thanks: 2,549
Thanked 1,600 Times in 928 Posts
Blog Entries: 4
Default
Re: XML feed help please!! urgent....
Share on: 
fb share twitter share gplus share more share

Originally Posted by kilgore View Post

...I'd do a search of your city/state field against this list of states. If there's a match, I'd assume that's the state and then I'd assume the rest of the text is the city.
Originally Posted by thedark View Post

As kilgore suggested the best approach is to have an array with state values and do a simple check. If the first item is in array, then it is a state, if not it is a city.
And I just happen to live in Wyoming, PA (USA), which would totally break that; LOL! (And yes, the state was named after the region in Pennsylvania; source.)

Put MY voice on YOUR video: AwesomeAmericanAudio.com
David Beroff is offline  
Unread 18th Nov 2015, 06:03 AM   #8
VIP Warrior
War Room Member
 
Join Date: 2006
Location: , , USA.
Posts: 1,795
Thanks: 70
Thanked 287 Times in 259 Posts
Default
Re: XML feed help please!! urgent....
Share on: 
fb share twitter share gplus share more share

It seems more like whatever function that is displaying by city doesn't work correctly.
KirkMcD is offline  
Unread 18th Nov 2015, 07:53 PM   #9
Active Warrior
 
Join Date: 2014
Posts: 90
Thanks: 1
Thanked 3 Times in 3 Posts
Default
Re: XML feed help please!! urgent....
Share on: 
fb share twitter share gplus share more share

The problem is figured out!! i got it guys. Thanks for advice, it actually led me to diagnose the problem and sit my butt down and figure it out... The bad news is it will take me about 6-12 hours to complelely fix ha...

I need GOOD real estate links for my nationwide real estate site...

Mobile Homes for sale
austine3859 is offline  
Closed Thread


Bookmarks

Tags
feed, urgent, xml


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 11:29 PM.