Jump to content

Simple PHP Call


Kovo

Recommended Posts

What would a PHP script look for displaying all <SITE> within the <INFOBLOG> category?<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/css" href="css2.css"?><SITES> <INFOBLOG> <SITE> <NAME>Kovo's Webspace</NAME> <LINK url="http://www.kovo.ca">http://www.kovo.ca</LINK> <DESC>An online blog.</DESC> </SITE> </INFOBLOG> <WEBDESIGN> <SITE> <NAME>Kevmedia</NAME> <LINK url="http://www.kevmedia.ca">http://www.kovo.ca</LINK> <DESC>A Montreal based, Web Design company.</DESC> </SITE> </WEBDESIGN> </SITES> Im a complete noob to this, and was just wondering if it was simple. Thanks

Link to comment
Share on other sites

It's pretty easy, but I think you should read the DOM tutorial on W3Schools first. The princiles in PHP are the same, only instead of dot (.) as with JS, you write "->". Either that, or udr an XPath expression with the query() function from the PHP DOM class.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...