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

Restricted access to sub-folder in iis6 doesn't work?
Basically I'm trying to add restriction to sub-folder (which contains pdf) in web.config for iis6 as

Searching keywords from array
Hello everyone, Im just wondering if someone could help me with another issue im having. Im still le

HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and n

Get word number x from string?
How can I use a function to loop through a string, and "have a look at" every word in the

how to remove in php string display
My code is

$message="We're looking at developing our website.";

$body= "

Calculus Help (and by help I mean homework)
Hrmmm, I hate posting about math homework, partly because it's homework, and partly because I hate w

Help with translating C code into assembler code
Hi im doing a project that moves a robot around a maze avoiding walls and need some help with conver

$variable = $variable
Hello

Sorry if this is a really simple question but I have run out of ideas. Is there a reall

Need a fuction to count entries in a field
Hi
I need a fuction to count how many times a email address is entered in to a field.

I ma

unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_
Can anyone view my code and tell me why im getting the error:
Parse error: syntax error, unexpect

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