/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Parse XML with PHP

I have this xml page [URL=”http://mp3.sermons.s3.amazonaws.com/”]http://mp3.sermons.s3.amazonaws.com/[/URL] and I would like php to parse the <Key> tags into a list of html links.

I will be so greatful if someone could help me. Thanks in advance.

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@NogDogFeb 01.2008 — Have you looked at the [url=http://www.php.net/simplexml]SimpleXML functions[/url] yet?
Copy linkTweet thisAlerts:
@robertketterauthorFeb 01.2008 — NogDog...I just looked into simplexml but will not be able to use it right now as my host is still using php 4. Do you have another idea?
Copy linkTweet thisAlerts:
@NogDogFeb 01.2008 — Well, you could try to get them to upgrade, since as of a month ago PHP 4 is officially "dead" and no longer supported.

Since that probably won't work, your basic options are the incredibly clumsy [url=http://www.php.net/manual/en/ref.xml.php]XML Parser functions[/url], doing some creative stuff with [url=http://www.php.net/preg_match_all]preg_match_all[/url]() and related functions, or looking at PEAR.php.net, www.sourceforge.net or similar sites for a ready-made class or function you could use.
×

Success!

Help @robertketter spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...