Reply to Re: Parsing XML Tags Help

Your name:

Reply:


Posted by NC on 10/09/05 22:03

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

[Back to original 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

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