You are here: Re: Parsing XML Tags Help « PHP Programming Language « IT news, forums, messages
Re: Parsing XML Tags Help

Posted by ralphNOSPAM on 10/10/05 07:57

On 9 Oct 2005 12:03:56 -0700, "NC" <nc@iname.com> wrote:

>ralphNOSPAM@primemail.com wrote:
>>
>> Is there a function or otherwise some way to pull out the target text
>> within an XML tag?
>
>There are at least two PHP extensions that allow parsing XML:
>
>http://www.php.net/XML
>http://www.php.net/DOMXML
>
>There's also the SimpleXML extension, but it requires PHP 5.
>
>> For example, in the XML tag below, I want to pull out 'CALIFORNIA'.
>>
>> <txtNameUSState>CALIFORNIA</txtNameUSState>
>
>If this is all you want, you can simply do
>
>$state = strip_tags('<txtNameUSState>CALIFORNIA</txtNameUSState>');
>
>or use regular expressions.
>
>Cheers,
>NC

There are multiple tags I need to strip out of the xml image so your
$state = example wouldn't work. Sorry, I was trying not to get too
deep.

I did read the php xml extension before I posted but I got lost.

I was hoping there was a function that would pull out the text between
an xml tag. If there is such a function in the php xml extensions I
couldn't see it ir otherwise figure it out.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация