Has anyone worked with the PHP DOM here? I'm trying to get data from files with .php extensions. It allows for xml, html, but I couldn't find anything for .php extensions.
It's important to note that you are allowed to add html/xml text for the DOM classes in the form of a string. Though, I only know how to get data from asource file with PHP; how would you grab the file after all PHP parsing?
Can someone help me out? What's the best way of going about this? Thanks.
Um... I don't think there is any such thing as the PHP DOM. PHP is simply a programming language used to generate webpages.
I don't think the extension is of any importance as long as the document is valid xml.
At least 98% of internet users' DNA is identical to that of chimpanzees
bals28mjk, it doesn't matter what the extension is, as long as the file contents is actually XML. You would use the load method like you would for any other file.
However, if it is a file on the local file system, you would not want to load it via a file system path, as the PHP would not then be executed, so you would be trying to parse the PHP source and the the XML/HTML/XHTML that it outputs. You would need to access it via a URL even if it's on the same host.
Originally Posted by Jeff Mott
Yeah, that's the issue I was trying to get around, calling the file with a url instead works.
Originally Posted by NogDog
Check this out Mr Initial Man, it might interest you: http://gtk.php.net/
Originally Posted by Mr Initial Man
It's a language binding used to build stand alone apps with php. I'm working on a personal project right now that uses it.
@all Thanks for sharing/helping.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)