|
Posted by jerry on 06/14/07 20:54
On Jun 14, 12:54 pm, Vladimir Ghetau <vladi...@pixeltomorrow.com>
wrote:
> On Jun 14, 3:59 pm, j...@mynetserv.com wrote:
>
> > Ok, I have a feed that I need to get the data from. The file is an
> > html file that contains items. I need to step through the file,
> > getting the first item, doing whatever, then the second item, and so
> > on. Any thoughts on the best way to to this?
>
> > <Feed>
> > <Item>
> > <ID>Data I need</ID>
> > <Title>Data I need</Title>
> > </Item>
> > <Item>
> > <ID>Data I need</ID>
> > <Title>Data I need</Title>
> > </Item>
> > </Feed>
>
> Yes, try these functions (explained at php.net with examples):
>
> xml_parser_create()
> xml_parser_set_option()
> xml_parse_into_struct()
> xml_parser_free()
>
> These four , come one after another, and they will help you parse the
> file easier.
>
> If you prefer regular expressions, let me know :-)
>
> BeachAndCocktails
I am looking into the xml_parser_ functions. Currently my feed doesn't
seem to be XML encoded, or complaint.
How would I do it with regular expressions?
[Back to original message]
|