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

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

Embedding flash object in Else statement
This is my first major project in PHP and I'm having some trouble embedding a flash object in an Els

Help please - How to validate from 2 possible answers
Hi

I hope somebody can help me with what will probably be really simple, I'm pulling my hair

TemplatePower & AJAX
Hi all,



I'm currently implementing some AJAX features in my PHP-framework (which is b

Can't find the problem (no error message)!
OK, here's the deal. This code is really weirdly formatted (sorry!) and hard to understand, so I'm g

Count
Getting the same count everytime

Code:
$visitquery = mysql_query("SELECT COUNT(*) FR

retrieving more than one max key from an array?
so i have an array of 20 numerical values (0-100) that i need to order from highest to lowest and th

SAP Treasury - Commodities
We are running SAP ECC 6.0 with Treasury Activated.
EA-FIN is also activated (SFW5).

Firewall / visited websites logger
Hi. I have a firewall implementation and I want to log all the websites visited on the machine. S

$action = "insert"; //$action = $_GET['action'];
$action = "insert";
//$action = $_GET['action'];

why is this invalid type? I am

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