Extracting URL pointer within XML tag


Posted on 16th Feb 2014 07:03 pm by admin

Hi.

I'm trying to extract text between two quotation marks in XML. For example, I want to extract:

Did you know?Explore Trending and Topic pages for more stories like this.
<a href="www.thisisanexample.com">Click here</a>. I want to extract www.thisisanexample.com. But the data I want to extract does not necessarily have to be <a href> link. It could be <car>, etc...

So far I have tried using simpleXML and regex but I seem to be at a dead end. Simplexml I was able to extract the data between tags, which is useful, but I want data that's inside the tags themselves.

Any insight would be greatly
No comments posted yet

Your Answer:

Login to answer
179 Like 21 Dislike
Previous forums Next forums
Other forums

Specific name typed, specific image shown on html page
Hello,

Fairly new to PHP and was curious if someone might know how to solve a fairly simple r

Showing selected item at top of list
Hi,

I've got a list of names which i am fetching from database like this:
$qry = db_query

Binding 2 UDP sockets on same port, connected to different destinations, 1 receives
Hello,
My application wants to send/recv data to 2 different UDP ports on a remote computer, us

How do I send data using an html link
Hi

If I have
<a href="main_file.php">

How do I send data t

Locking mysql tables with php
Hi

BACKGROUND:
I have multiple instances of the same php script running in a WAMP environ

Undefined Variable: PHP_SELF, pls help
Hi,

Im a newbie on PHP / MySQL programming and Im running a script to search one field on my

switch not getting value
what am i doing wrong?
i want to populate the country list according to the category
i want to

Displaying returned XML in another PHP page
I have an online payment form that will return XML given if a payment is successful or declines. I

Anti Spam Code Problems
Ok where do i start? Probably by telling you I have very little working knowledge of PHP and that I

=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash