|
Posted by Oli Filth on 02/28/06 16:53
Tomi Holger Engdahl said the following on 28/02/2006 12:01:
> "Joshua Morgan" <joshua.morgan@gmail.com> writes:
>
>> A general XML parser, and that is actually what I was considering
>> doing, using regular expression to pull out the data and put it into a
>> nice array that can be used by some functions.
>
> You can find examples of reading XML files using three different
> techniques (including that regular expression method) at this
> article:
>
> Reading and writing the XML DOM with PHP
> Using the DOM library, SAX parser and regular expressions
> http://www-128.ibm.com/developerworks/xml/library/os-xmldomphp/?ca=dgr-lnxw06XML-PHP
>
And as that article says, use of regular expressions to "parse" XML is a
bad idea unless you're absolutely sure that the XML string/file is
well-formed and valid.
--
Oli
Navigation:
[Reply to this message]
|