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

An odd assignment statement. Can someone explain this assignment to me?
What purpose is served by the bit of code between the two equal signs in the $installurl set? Is th

'grab_files', multiple extension?
hey guys,

can anyone suggest a way to make to following line of code look for files with more

How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

sendmail code suddenly not working
Hi Guys, I maintain 3 sites (including my own) I use the following code from a french webmaster that

Writing to the middle of a file
Hi I have a bit of a problem. Is there any way i can write some text to a middle of a text file. For

MySQL noob question
hi guys

I have a simple mysql table set up, along the lines of

Col 1 - Col 2 - Date_l

form problem
Hi all, I think this is going to be easy to resolve but for I have been looking at it to long and I

Code Help.. If txt input box empty search X instead..
I am having a problem with my search script. At current it will simply search by a selected date whi

downloading a file as HTML
Hi.
I'm rather confused with forcing a download. I just want to save dynamic content (from $_SESS

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