xpaths
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: xpaths
If the site is not valid XML then you'll struggle. Web browsers go to great lengths to deal with invlaid (X)HTML but most XML libraries want valid XML.
SimpleXML may work, but I doubt it. What do you need to do this for?
SimpleXML may work, but I doubt it. What do you need to do this for?
Re: xpaths
Id like to pull a list of locations off of a certain site so that I can keep my database upto date.
I don't believe the site i'm looking at provides regular xml but could you please explain what makes xml regular? And are there any good packages to convert irregular xml to regualr xml? Thank you.
I don't believe the site i'm looking at provides regular xml but could you please explain what makes xml regular? And are there any good packages to convert irregular xml to regualr xml? Thank you.
Re: xpaths
actually dom extension allows to load html:
php manual wrote: DOMDocument::loadHTML
bool DOMDocument::loadHTML ( string $source )
The function parses the HTML contained in the string source . Unlike loading XML, HTML does not have to be well-formed to load. [...]
Re: xpaths
thanks. thats exactly what i needed (once i was able to suppress all the annoying warnings).
do you know if its possible to make the query command return an array of string instead of objects? I know its not necessary, but i think it would be more efficient.
do you know if its possible to make the query command return an array of string instead of objects? I know its not necessary, but i think it would be more efficient.