Re: Regular Expression Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# jochem@xxxxxxxxxxxxx / 2007-01-24 23:55:27 +0100:
> Roman Neuhauser wrote:
> > Are you doing this to learn regular expressions or are you actually
> > trying to do work? Because you're going the wrong way.
> > It's XML, why do you treat it as text?
> 
> not everyone shares that sentiment. in terms of lowest common denominator
> XML is also a string. then there is the question of whether it's actually
> marked as XML, whether there is valid DTD and whether the XML itself validates
> against the DTD - if any of the answers is 'no' then your looking at tag soup.

as long as it's wellformed he can use it for what it is: a serialized
composite structure, like the result of serialize($aTreeOfObjects).
You can use preg_match() to extract a subset of the tree, but why bother
if you have unserialize($aTreeOfObjects)->getElementById("foo")?
 
-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux