May 4, 2011

Filter part within XML tag | CyberSEO Pro | Support Forums

Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_topicicon
Filter part within XML tag
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
June 13, 2022
12:54 pm
Avatar
Member
Members
Forum Posts: 54
Member Since:
February 16, 2016
sp_userofflinesmall Offline

Anybody know how to filter out a part within a XML tag:

Login to see the code.

Login to see the code.

June 13, 2022
2:18 pm
Avatar
Admin
Forum Posts: 3102
Member Since:
July 2, 2009
sp_userofflinesmall Offline

Where this value is located? Do you store it in a variable or an an array? Can you post the actual XML feed URL?

For example, lets consider it’s stored as a custom field (e.g. “some_field”). In this case the following code will do the trick:

Login to see the code.

June 13, 2022
3:59 pm
Avatar
Member
Members
Forum Posts: 54
Member Since:
February 16, 2016
sp_userofflinesmall Offline

Login to see this link.

June 13, 2022
5:25 pm
Avatar
Admin
Forum Posts: 3102
Member Since:
July 2, 2009
sp_userofflinesmall Offline

Use the code above and put this line into the “Custom fields” box:

downloads->some_field

 

or use this code:

Login to see the code.

June 30, 2022
10:42 am
Avatar
Member
Members
Forum Posts: 54
Member Since:
February 16, 2016
sp_userofflinesmall Offline

I have this code now

Login to see the code.

June 30, 2022
1:05 pm
Avatar
Admin
Forum Posts: 3102
Member Since:
July 2, 2009
sp_userofflinesmall Offline

If the <downloads> tag is defined in your feed and it’s value starts with “http” and ends with “.mp4”, its value will be stored in the <video_url> custom filed. It won’t be stored there is <downloads> is not defined, if its value is empty or it’s not a link to a MP4 file (e.g. if that video file has a different file extension). It won’t happen “sometimes”. It works in 100% cases described above.

July 5, 2022
9:29 am
Avatar
Member
Members
Forum Posts: 54
Member Since:
February 16, 2016
sp_userofflinesmall Offline

CyberSEO said
If the <downloads> tag is defined in your feed and it’s value starts with “http” and ends with “.mp4”, its value will be stored in the <video_url> custom filed. It won’t be stored there is <downloads> is not defined, if its value is empty or it’s not a link to a MP4 file (e.g. if that video file has a different file extension). It won’t happen “sometimes”. It works in 100% cases described above.  

Is it possible to make it conditional?

if <downloads> is “” not to parse the post and skip to the next one?

July 5, 2022
1:04 pm
Avatar
Admin
Forum Posts: 3102
Member Since:
July 2, 2009
sp_userofflinesmall Offline

Sure:

Login to see the code.

Forum Timezone: Europe/Moscow

Most Users Ever Online: 105

Currently Online:
6 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 81

Freedom: 61

B8europe: 54

saviulisse67: 45

adultdenim: 44

allgoodies: 38

Member Stats:

Guest Posters: 350

Members: 1928

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 2

Topics: 1331

Posts: 6637

Administrators: CyberSEO: 3102