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

How to assign a textbox value to PHP variable??
Hi ! Can any one help me out as quickly as possible. As I m new to PHP.
Plz tell me how to assign

DOMDocument parsing
Hello, I am parsing an xml file from an API which I have converted into a DOMDocument in php. This i

Getting PHP to ammended the selected in option field
Hey Guys

thanks for everyones help so far. This site and its users are oozing awesomness.

Getting number of affected rows in SQLPLUS..
Hi everyone,
I have a shell script where i am invoking sqlplus, running a query and saving t

php mysql script to find record
Hi,

Currently I have a simple table with 4 columns. A, B, C, D

If I want to find all

Solution to the FindControl problem
I have seen may posts about having problems with the FindControl method. Most seem to come about bec

Time script, set to my time zone?
I am using this line to get the date and time

Code: $time = date(F." ".d.", &q

script and html conflict in trying to create a header.
I have an error is occurring because of an html webpage with a "php require" at the top of

breaking a text file into paragraphs based on strings
I have a text file of email addresses that is all squished together. It looks like this:

abc

scandir clients directory
hi,
how can i scandir the clients directory? i need a script that when i click a button it will u

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